From a429b262553908a4a709d8ccafa532053d6700aa Mon Sep 17 00:00:00 2001 From: sdk team Date: Mon, 20 Nov 2023 11:00:25 +0000 Subject: [PATCH] Updated client bindings for services/vmwarecloud/vmc_aws_cho_provider/v0.1.0. Signed-off-by: sdk team --- .../VmcAwsChoProviderPackageTypes.go | 11 + .../operator/spla/MaintenanceHostsClient.go | 170 ++++ .../operator/spla/MaintenanceHostsTypes.go | 182 ++++ .../operator/spla/SplaPackageTypes.go | 11 + .../inventory/vmc_aws/VmcAwsPackageTypes.go | 11 + .../vmc_aws/WorkflowRouteDestinationClient.go | 90 ++ .../vmc_aws/WorkflowRouteDestinationTypes.go | 76 ++ .../DeploymentIdaddClusterClient.go | 94 +++ .../DeploymentIdaddClusterTypes.go | 83 ++ .../DeploymentIddeleteClusterClient.go | 94 +++ .../DeploymentIddeleteClusterTypes.go | 83 ++ .../DeploymentIddeleteHostClient.go | 94 +++ .../DeploymentIddeleteHostInternalClient.go | 94 +++ .../DeploymentIddeleteHostInternalTypes.go | 83 ++ .../DeploymentIddeleteHostTypes.go | 83 ++ ...ploymentIdmodifyInternalHostCountClient.go | 94 +++ ...eploymentIdmodifyInternalHostCountTypes.go | 83 ++ .../DeploymentIdmsftLicensingPublishClient.go | 94 +++ .../DeploymentIdmsftLicensingPublishTypes.go | 83 ++ .../deployments/DeploymentsPackageTypes.go | 11 + .../workflow/rules/RulesPackageTypes.go | 11 + .../workflow/rules/VersionpromoteClient.go | 82 ++ .../workflow/rules/VersionpromoteTypes.go | 69 ++ .../vmwarecloud/vmc_aws_cho_provider/go.mod | 16 + .../vmwarecloud/vmc_aws_cho_provider/go.sum | 53 ++ .../model/ModelPackageTypes.go | 796 ++++++++++++++++++ 26 files changed, 2651 insertions(+) create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/VmcAwsChoProviderPackageTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/SplaPackageTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/VmcAwsPackageTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentsPackageTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/RulesPackageTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteClient.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteTypes.go create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/go.mod create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/go.sum create mode 100644 services/vmwarecloud/vmc_aws_cho_provider/model/ModelPackageTypes.go diff --git a/services/vmwarecloud/vmc_aws_cho_provider/VmcAwsChoProviderPackageTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/VmcAwsChoProviderPackageTypes.go new file mode 100644 index 000000000..e96c4d57b --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/VmcAwsChoProviderPackageTypes.go @@ -0,0 +1,11 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for package: com.vmware.vmwarecloud.vmc_aws_cho_provider. +// Includes binding types of a top level structures and enumerations. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package vmc_aws_cho_provider diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsClient.go new file mode 100644 index 000000000..096496d7f --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsClient.go @@ -0,0 +1,170 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: MaintenanceHosts +// Used by client-side stubs. + +package spla + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type MaintenanceHostsClient interface { + + // Get SPLA maintenance hosts info for given region. Shall be used by operator. + // + // @param awsRegionParam AWS Region + // @return OK + // + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + GetSplaMaintenanceHostsInfo(awsRegionParam string) (vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo, error) + + // Add maintenance hosts for SPLA info with given region. Shall be used by operator. + // + // @param addSplaMaintenanceHostsInfoRequestBodyParam Payload for updating SplaMaintenanceHostsInfo + // @param awsRegionParam AWS Region + // @return OK + // + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + AddSplaMaintenanceHostsInfo(addSplaMaintenanceHostsInfoRequestBodyParam []vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost, awsRegionParam string) (vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo, error) + + // Delete maintenance hosts for SPLA info with given region. Shall be used by operator. + // + // @param removeSplaMaintenanceHostsInfoRequestBodyParam Payload for updating SplaMaintenanceHostsInfo + // @param awsRegionParam AWS Region + // @return OK + // + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + RemoveSplaMaintenanceHostsInfo(removeSplaMaintenanceHostsInfoRequestBodyParam []vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost, awsRegionParam string) error +} + +type maintenanceHostsClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewMaintenanceHostsClient(connector vapiProtocolClient_.Connector) *maintenanceHostsClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.operator.spla.maintenance_hosts") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "get_spla_maintenance_hosts_info": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "get_spla_maintenance_hosts_info"), + "add_spla_maintenance_hosts_info": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "add_spla_maintenance_hosts_info"), + "remove_spla_maintenance_hosts_info": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "remove_spla_maintenance_hosts_info"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + mIface := maintenanceHostsClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &mIface +} + +func (mIface *maintenanceHostsClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := mIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (mIface *maintenanceHostsClient) GetSplaMaintenanceHostsInfo(awsRegionParam string) (vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo, error) { + typeConverter := mIface.connector.TypeConverter() + executionContext := mIface.connector.NewExecutionContext() + operationRestMetaData := maintenanceHostsGetSplaMaintenanceHostsInfoRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(maintenanceHostsGetSplaMaintenanceHostsInfoInputType(), typeConverter) + sv.AddStructField("AwsRegion", awsRegionParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := mIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.operator.spla.maintenance_hosts", "get_spla_maintenance_hosts_info", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), MaintenanceHostsGetSplaMaintenanceHostsInfoOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), mIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} + +func (mIface *maintenanceHostsClient) AddSplaMaintenanceHostsInfo(addSplaMaintenanceHostsInfoRequestBodyParam []vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost, awsRegionParam string) (vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo, error) { + typeConverter := mIface.connector.TypeConverter() + executionContext := mIface.connector.NewExecutionContext() + operationRestMetaData := maintenanceHostsAddSplaMaintenanceHostsInfoRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(maintenanceHostsAddSplaMaintenanceHostsInfoInputType(), typeConverter) + sv.AddStructField("AddSplaMaintenanceHostsInfoRequestBody", addSplaMaintenanceHostsInfoRequestBodyParam) + sv.AddStructField("AwsRegion", awsRegionParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := mIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.operator.spla.maintenance_hosts", "add_spla_maintenance_hosts_info", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), MaintenanceHostsAddSplaMaintenanceHostsInfoOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfo), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), mIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} + +func (mIface *maintenanceHostsClient) RemoveSplaMaintenanceHostsInfo(removeSplaMaintenanceHostsInfoRequestBodyParam []vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost, awsRegionParam string) error { + typeConverter := mIface.connector.TypeConverter() + executionContext := mIface.connector.NewExecutionContext() + operationRestMetaData := maintenanceHostsRemoveSplaMaintenanceHostsInfoRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(maintenanceHostsRemoveSplaMaintenanceHostsInfoInputType(), typeConverter) + sv.AddStructField("RemoveSplaMaintenanceHostsInfoRequestBody", removeSplaMaintenanceHostsInfoRequestBodyParam) + sv.AddStructField("AwsRegion", awsRegionParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + return vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := mIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.operator.spla.maintenance_hosts", "remove_spla_maintenance_hosts_info", inputDataValue, executionContext) + if methodResult.IsSuccess() { + return nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), mIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return vapiBindings_.VAPIerrorsToError(errorInError) + } + return methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsTypes.go new file mode 100644 index 000000000..68f53b8f9 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/MaintenanceHostsTypes.go @@ -0,0 +1,182 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: MaintenanceHosts. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package spla + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func maintenanceHostsGetSplaMaintenanceHostsInfoInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["aws_region"] = vapiBindings_.NewStringType() + fieldNameMap["aws_region"] = "AwsRegion" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func MaintenanceHostsGetSplaMaintenanceHostsInfoOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfoBindingType) +} + +func maintenanceHostsGetSplaMaintenanceHostsInfoRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["aws_region"] = vapiBindings_.NewStringType() + fieldNameMap["aws_region"] = "AwsRegion" + paramsTypeMap["aws_region"] = vapiBindings_.NewStringType() + queryParams["aws_region"] = "aws_region" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "", + "GET", + "/api/inventory/operator/spla/maintenance-hosts", + "", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403}) +} + +func maintenanceHostsAddSplaMaintenanceHostsInfoInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["add_spla_maintenance_hosts_info_request_body"] = vapiBindings_.NewListType(vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.MaintenanceHostBindingType), reflect.TypeOf([]vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost{})) + fields["aws_region"] = vapiBindings_.NewStringType() + fieldNameMap["add_spla_maintenance_hosts_info_request_body"] = "AddSplaMaintenanceHostsInfoRequestBody" + fieldNameMap["aws_region"] = "AwsRegion" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func MaintenanceHostsAddSplaMaintenanceHostsInfoOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.SplaMaintenanceHostsInfoBindingType) +} + +func maintenanceHostsAddSplaMaintenanceHostsInfoRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["add_spla_maintenance_hosts_info_request_body"] = vapiBindings_.NewListType(vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.MaintenanceHostBindingType), reflect.TypeOf([]vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost{})) + fields["aws_region"] = vapiBindings_.NewStringType() + fieldNameMap["add_spla_maintenance_hosts_info_request_body"] = "AddSplaMaintenanceHostsInfoRequestBody" + fieldNameMap["aws_region"] = "AwsRegion" + paramsTypeMap["aws_region"] = vapiBindings_.NewStringType() + paramsTypeMap["add_spla_maintenance_hosts_info_request_body"] = vapiBindings_.NewListType(vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.MaintenanceHostBindingType), reflect.TypeOf([]vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost{})) + queryParams["aws_region"] = "aws_region" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "add_spla_maintenance_hosts_info_request_body", + "POST", + "/api/inventory/operator/spla/maintenance-hosts", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403}) +} + +func maintenanceHostsRemoveSplaMaintenanceHostsInfoInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["remove_spla_maintenance_hosts_info_request_body"] = vapiBindings_.NewListType(vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.MaintenanceHostBindingType), reflect.TypeOf([]vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost{})) + fields["aws_region"] = vapiBindings_.NewStringType() + fieldNameMap["remove_spla_maintenance_hosts_info_request_body"] = "RemoveSplaMaintenanceHostsInfoRequestBody" + fieldNameMap["aws_region"] = "AwsRegion" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func MaintenanceHostsRemoveSplaMaintenanceHostsInfoOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewVoidType() +} + +func maintenanceHostsRemoveSplaMaintenanceHostsInfoRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["remove_spla_maintenance_hosts_info_request_body"] = vapiBindings_.NewListType(vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.MaintenanceHostBindingType), reflect.TypeOf([]vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost{})) + fields["aws_region"] = vapiBindings_.NewStringType() + fieldNameMap["remove_spla_maintenance_hosts_info_request_body"] = "RemoveSplaMaintenanceHostsInfoRequestBody" + fieldNameMap["aws_region"] = "AwsRegion" + paramsTypeMap["remove_spla_maintenance_hosts_info_request_body"] = vapiBindings_.NewListType(vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.MaintenanceHostBindingType), reflect.TypeOf([]vmwarecloudVmc_aws_cho_providerModel.MaintenanceHost{})) + paramsTypeMap["aws_region"] = vapiBindings_.NewStringType() + queryParams["aws_region"] = "aws_region" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "remove_spla_maintenance_hosts_info_request_body", + "DELETE", + "/api/inventory/operator/spla/maintenance-hosts", + "", + resultHeaders, + 204, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/SplaPackageTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/SplaPackageTypes.go new file mode 100644 index 000000000..7089235c7 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/operator/spla/SplaPackageTypes.go @@ -0,0 +1,11 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for package: com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.operator.spla. +// Includes binding types of a top level structures and enumerations. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package spla diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/VmcAwsPackageTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/VmcAwsPackageTypes.go new file mode 100644 index 000000000..c049996a9 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/VmcAwsPackageTypes.go @@ -0,0 +1,11 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for package: com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws. +// Includes binding types of a top level structures and enumerations. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package vmc_aws diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationClient.go new file mode 100644 index 000000000..b02e3b426 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationClient.go @@ -0,0 +1,90 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: WorkflowRouteDestination +// Used by client-side stubs. + +package vmc_aws + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type WorkflowRouteDestinationClient interface { + + // Get workflow destination. + // + // @param orgIdParam organization identifier + // @param workflowRoutingPayloadParam Payload for getting the workflow destination + // @return OK + // + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + GetWorkflowDestination(orgIdParam string, workflowRoutingPayloadParam vmwarecloudVmc_aws_cho_providerModel.WorkflowRoutingPayload) (vmwarecloudVmc_aws_cho_providerModel.WorkflowDestinationResponse, error) +} + +type workflowRouteDestinationClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewWorkflowRouteDestinationClient(connector vapiProtocolClient_.Connector) *workflowRouteDestinationClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.workflow_route_destination") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "get_workflow_destination": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "get_workflow_destination"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + wIface := workflowRouteDestinationClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &wIface +} + +func (wIface *workflowRouteDestinationClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := wIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (wIface *workflowRouteDestinationClient) GetWorkflowDestination(orgIdParam string, workflowRoutingPayloadParam vmwarecloudVmc_aws_cho_providerModel.WorkflowRoutingPayload) (vmwarecloudVmc_aws_cho_providerModel.WorkflowDestinationResponse, error) { + typeConverter := wIface.connector.TypeConverter() + executionContext := wIface.connector.NewExecutionContext() + operationRestMetaData := workflowRouteDestinationGetWorkflowDestinationRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(workflowRouteDestinationGetWorkflowDestinationInputType(), typeConverter) + sv.AddStructField("OrgId", orgIdParam) + sv.AddStructField("WorkflowRoutingPayload", workflowRoutingPayloadParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.WorkflowDestinationResponse + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := wIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.workflow_route_destination", "get_workflow_destination", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.WorkflowDestinationResponse + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), WorkflowRouteDestinationGetWorkflowDestinationOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.WorkflowDestinationResponse), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), wIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationTypes.go new file mode 100644 index 000000000..2e9f72903 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/WorkflowRouteDestinationTypes.go @@ -0,0 +1,76 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: WorkflowRouteDestination. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package vmc_aws + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func workflowRouteDestinationGetWorkflowDestinationInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["org_id"] = vapiBindings_.NewStringType() + fields["workflow_routing_payload"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.WorkflowRoutingPayloadBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["workflow_routing_payload"] = "WorkflowRoutingPayload" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func WorkflowRouteDestinationGetWorkflowDestinationOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.WorkflowDestinationResponseBindingType) +} + +func workflowRouteDestinationGetWorkflowDestinationRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["org_id"] = vapiBindings_.NewStringType() + fields["workflow_routing_payload"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.WorkflowRoutingPayloadBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["workflow_routing_payload"] = "WorkflowRoutingPayload" + paramsTypeMap["org_id"] = vapiBindings_.NewStringType() + paramsTypeMap["workflow_routing_payload"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.WorkflowRoutingPayloadBindingType) + paramsTypeMap["orgId"] = vapiBindings_.NewStringType() + pathParams["org_id"] = "orgId" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "workflow_routing_payload", + "POST", + "/api/inventory/{orgId}/vmc-aws/workflow-route-destination", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterClient.go new file mode 100644 index 000000000..de6312dfd --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterClient.go @@ -0,0 +1,94 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: DeploymentIdaddCluster +// Used by client-side stubs. + +package deployments + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type DeploymentIdaddClusterClient interface { + + // Adds a cluster to a deployment + // + // @param orgIdParam organization identifier + // @param deploymentIdParam deployment identifier + // @param addClusterIntentParam Payload for the Add Cluster request + // @return Activity accepted for processing + // + // @throws InvalidRequest Bad Request + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + // @throws NotFound Not Found + PostAddCluster(orgIdParam string, deploymentIdParam string, addClusterIntentParam vmwarecloudVmc_aws_cho_providerModel.AddClusterIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) +} + +type deploymentIdaddClusterClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewDeploymentIdaddClusterClient(connector vapiProtocolClient_.Connector) *deploymentIdaddClusterClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_idadd_cluster") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "post_add_cluster": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "post_add_cluster"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + dIface := deploymentIdaddClusterClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &dIface +} + +func (dIface *deploymentIdaddClusterClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := dIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (dIface *deploymentIdaddClusterClient) PostAddCluster(orgIdParam string, deploymentIdParam string, addClusterIntentParam vmwarecloudVmc_aws_cho_providerModel.AddClusterIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) { + typeConverter := dIface.connector.TypeConverter() + executionContext := dIface.connector.NewExecutionContext() + operationRestMetaData := deploymentIdaddClusterPostAddClusterRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(deploymentIdaddClusterPostAddClusterInputType(), typeConverter) + sv.AddStructField("OrgId", orgIdParam) + sv.AddStructField("DeploymentId", deploymentIdParam) + sv.AddStructField("AddClusterIntent", addClusterIntentParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := dIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_idadd_cluster", "post_add_cluster", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), DeploymentIdaddClusterPostAddClusterOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.ActivityResponse), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), dIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterTypes.go new file mode 100644 index 000000000..692517b0b --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdaddClusterTypes.go @@ -0,0 +1,83 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: DeploymentIdaddCluster. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package deployments + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func deploymentIdaddClusterPostAddClusterInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["add_cluster_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.AddClusterIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["add_cluster_intent"] = "AddClusterIntent" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func DeploymentIdaddClusterPostAddClusterOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ActivityResponseBindingType) +} + +func deploymentIdaddClusterPostAddClusterRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["add_cluster_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.AddClusterIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["add_cluster_intent"] = "AddClusterIntent" + paramsTypeMap["add_cluster_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.AddClusterIntentBindingType) + paramsTypeMap["org_id"] = vapiBindings_.NewStringType() + paramsTypeMap["deployment_id"] = vapiBindings_.NewStringType() + paramsTypeMap["orgId"] = vapiBindings_.NewStringType() + paramsTypeMap["deploymentId"] = vapiBindings_.NewStringType() + pathParams["deployment_id"] = "deploymentId" + pathParams["org_id"] = "orgId" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "add_cluster_intent", + "POST", + "/api/inventory/{orgId}/vmc-aws/deployments/{deploymentId}:add-cluster", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.invalid_request": 400, "com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403, "com.vmware.vapi.std.errors.not_found": 404}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterClient.go new file mode 100644 index 000000000..31361cf1d --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterClient.go @@ -0,0 +1,94 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: DeploymentIddeleteCluster +// Used by client-side stubs. + +package deployments + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type DeploymentIddeleteClusterClient interface { + + // Deletes a cluster present in a deployment + // + // @param orgIdParam organization identifier + // @param deploymentIdParam deployment identifier + // @param deleteClusterIntentParam Payload for the Delete Cluster request + // @return Activity accepted for processing + // + // @throws InvalidRequest Bad Request + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + // @throws NotFound Not Found + PostDeleteCluster(orgIdParam string, deploymentIdParam string, deleteClusterIntentParam vmwarecloudVmc_aws_cho_providerModel.DeleteClusterIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) +} + +type deploymentIddeleteClusterClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewDeploymentIddeleteClusterClient(connector vapiProtocolClient_.Connector) *deploymentIddeleteClusterClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_iddelete_cluster") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "post_delete_cluster": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "post_delete_cluster"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + dIface := deploymentIddeleteClusterClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &dIface +} + +func (dIface *deploymentIddeleteClusterClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := dIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (dIface *deploymentIddeleteClusterClient) PostDeleteCluster(orgIdParam string, deploymentIdParam string, deleteClusterIntentParam vmwarecloudVmc_aws_cho_providerModel.DeleteClusterIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) { + typeConverter := dIface.connector.TypeConverter() + executionContext := dIface.connector.NewExecutionContext() + operationRestMetaData := deploymentIddeleteClusterPostDeleteClusterRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(deploymentIddeleteClusterPostDeleteClusterInputType(), typeConverter) + sv.AddStructField("OrgId", orgIdParam) + sv.AddStructField("DeploymentId", deploymentIdParam) + sv.AddStructField("DeleteClusterIntent", deleteClusterIntentParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := dIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_iddelete_cluster", "post_delete_cluster", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), DeploymentIddeleteClusterPostDeleteClusterOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.ActivityResponse), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), dIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterTypes.go new file mode 100644 index 000000000..558f35b1d --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteClusterTypes.go @@ -0,0 +1,83 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: DeploymentIddeleteCluster. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package deployments + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func deploymentIddeleteClusterPostDeleteClusterInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["delete_cluster_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteClusterIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["delete_cluster_intent"] = "DeleteClusterIntent" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func DeploymentIddeleteClusterPostDeleteClusterOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ActivityResponseBindingType) +} + +func deploymentIddeleteClusterPostDeleteClusterRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["delete_cluster_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteClusterIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["delete_cluster_intent"] = "DeleteClusterIntent" + paramsTypeMap["delete_cluster_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteClusterIntentBindingType) + paramsTypeMap["org_id"] = vapiBindings_.NewStringType() + paramsTypeMap["deployment_id"] = vapiBindings_.NewStringType() + paramsTypeMap["orgId"] = vapiBindings_.NewStringType() + paramsTypeMap["deploymentId"] = vapiBindings_.NewStringType() + pathParams["deployment_id"] = "deploymentId" + pathParams["org_id"] = "orgId" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "delete_cluster_intent", + "POST", + "/api/inventory/{orgId}/vmc-aws/deployments/{deploymentId}:delete-cluster", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.invalid_request": 400, "com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403, "com.vmware.vapi.std.errors.not_found": 404}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostClient.go new file mode 100644 index 000000000..2744f07f3 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostClient.go @@ -0,0 +1,94 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: DeploymentIddeleteHost +// Used by client-side stubs. + +package deployments + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type DeploymentIddeleteHostClient interface { + + // Removes a host from the cluster associated with a deployment + // + // @param orgIdParam organization identifier + // @param deploymentIdParam deployment identifier + // @param deleteHostIntentParam Payload for the Delete Host request + // @return Activity accepted for processing + // + // @throws InvalidRequest Bad Request + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + // @throws NotFound Not Found + PostDeploymentDeleteHost(orgIdParam string, deploymentIdParam string, deleteHostIntentParam vmwarecloudVmc_aws_cho_providerModel.DeleteHostIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) +} + +type deploymentIddeleteHostClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewDeploymentIddeleteHostClient(connector vapiProtocolClient_.Connector) *deploymentIddeleteHostClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_iddelete_host") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "post_deployment_delete_host": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "post_deployment_delete_host"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + dIface := deploymentIddeleteHostClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &dIface +} + +func (dIface *deploymentIddeleteHostClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := dIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (dIface *deploymentIddeleteHostClient) PostDeploymentDeleteHost(orgIdParam string, deploymentIdParam string, deleteHostIntentParam vmwarecloudVmc_aws_cho_providerModel.DeleteHostIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) { + typeConverter := dIface.connector.TypeConverter() + executionContext := dIface.connector.NewExecutionContext() + operationRestMetaData := deploymentIddeleteHostPostDeploymentDeleteHostRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(deploymentIddeleteHostPostDeploymentDeleteHostInputType(), typeConverter) + sv.AddStructField("OrgId", orgIdParam) + sv.AddStructField("DeploymentId", deploymentIdParam) + sv.AddStructField("DeleteHostIntent", deleteHostIntentParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := dIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_iddelete_host", "post_deployment_delete_host", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), DeploymentIddeleteHostPostDeploymentDeleteHostOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.ActivityResponse), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), dIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalClient.go new file mode 100644 index 000000000..f8cfc3da6 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalClient.go @@ -0,0 +1,94 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: DeploymentIddeleteHostInternal +// Used by client-side stubs. + +package deployments + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type DeploymentIddeleteHostInternalClient interface { + + // Removes a host to the cluster associated with a deployment. Shall be used by operator. + // + // @param orgIdParam organization identifier + // @param deploymentIdParam deployment identifier + // @param deleteHostInternalIntentParam Payload for the Delete Host request + // @return Activity accepted for processing + // + // @throws InvalidRequest Bad Request + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + // @throws NotFound Not Found + PostDeploymentDeleteHostInternal(orgIdParam string, deploymentIdParam string, deleteHostInternalIntentParam vmwarecloudVmc_aws_cho_providerModel.DeleteHostInternalIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) +} + +type deploymentIddeleteHostInternalClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewDeploymentIddeleteHostInternalClient(connector vapiProtocolClient_.Connector) *deploymentIddeleteHostInternalClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_iddelete_host_internal") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "post_deployment_delete_host_internal": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "post_deployment_delete_host_internal"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + dIface := deploymentIddeleteHostInternalClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &dIface +} + +func (dIface *deploymentIddeleteHostInternalClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := dIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (dIface *deploymentIddeleteHostInternalClient) PostDeploymentDeleteHostInternal(orgIdParam string, deploymentIdParam string, deleteHostInternalIntentParam vmwarecloudVmc_aws_cho_providerModel.DeleteHostInternalIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) { + typeConverter := dIface.connector.TypeConverter() + executionContext := dIface.connector.NewExecutionContext() + operationRestMetaData := deploymentIddeleteHostInternalPostDeploymentDeleteHostInternalRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(deploymentIddeleteHostInternalPostDeploymentDeleteHostInternalInputType(), typeConverter) + sv.AddStructField("OrgId", orgIdParam) + sv.AddStructField("DeploymentId", deploymentIdParam) + sv.AddStructField("DeleteHostInternalIntent", deleteHostInternalIntentParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := dIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_iddelete_host_internal", "post_deployment_delete_host_internal", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), DeploymentIddeleteHostInternalPostDeploymentDeleteHostInternalOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.ActivityResponse), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), dIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalTypes.go new file mode 100644 index 000000000..ce0d52b38 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostInternalTypes.go @@ -0,0 +1,83 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: DeploymentIddeleteHostInternal. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package deployments + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func deploymentIddeleteHostInternalPostDeploymentDeleteHostInternalInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["delete_host_internal_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteHostInternalIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["delete_host_internal_intent"] = "DeleteHostInternalIntent" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func DeploymentIddeleteHostInternalPostDeploymentDeleteHostInternalOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ActivityResponseBindingType) +} + +func deploymentIddeleteHostInternalPostDeploymentDeleteHostInternalRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["delete_host_internal_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteHostInternalIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["delete_host_internal_intent"] = "DeleteHostInternalIntent" + paramsTypeMap["org_id"] = vapiBindings_.NewStringType() + paramsTypeMap["delete_host_internal_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteHostInternalIntentBindingType) + paramsTypeMap["deployment_id"] = vapiBindings_.NewStringType() + paramsTypeMap["orgId"] = vapiBindings_.NewStringType() + paramsTypeMap["deploymentId"] = vapiBindings_.NewStringType() + pathParams["deployment_id"] = "deploymentId" + pathParams["org_id"] = "orgId" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "delete_host_internal_intent", + "POST", + "/api/inventory/{orgId}/vmc-aws/deployments/{deploymentId}:delete-host-internal", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.invalid_request": 400, "com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403, "com.vmware.vapi.std.errors.not_found": 404}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostTypes.go new file mode 100644 index 000000000..c0c8e8b21 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIddeleteHostTypes.go @@ -0,0 +1,83 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: DeploymentIddeleteHost. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package deployments + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func deploymentIddeleteHostPostDeploymentDeleteHostInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["delete_host_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteHostIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["delete_host_intent"] = "DeleteHostIntent" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func DeploymentIddeleteHostPostDeploymentDeleteHostOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ActivityResponseBindingType) +} + +func deploymentIddeleteHostPostDeploymentDeleteHostRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["delete_host_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteHostIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["delete_host_intent"] = "DeleteHostIntent" + paramsTypeMap["org_id"] = vapiBindings_.NewStringType() + paramsTypeMap["deployment_id"] = vapiBindings_.NewStringType() + paramsTypeMap["delete_host_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.DeleteHostIntentBindingType) + paramsTypeMap["orgId"] = vapiBindings_.NewStringType() + paramsTypeMap["deploymentId"] = vapiBindings_.NewStringType() + pathParams["deployment_id"] = "deploymentId" + pathParams["org_id"] = "orgId" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "delete_host_intent", + "POST", + "/api/inventory/{orgId}/vmc-aws/deployments/{deploymentId}:delete-host", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.invalid_request": 400, "com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403, "com.vmware.vapi.std.errors.not_found": 404}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountClient.go new file mode 100644 index 000000000..399ab4da8 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountClient.go @@ -0,0 +1,94 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: DeploymentIdmodifyInternalHostCount +// Used by client-side stubs. + +package deployments + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type DeploymentIdmodifyInternalHostCountClient interface { + + // Modify internal host count for given cluster + // + // @param orgIdParam organization identifier + // @param deploymentIdParam deployment identifier + // @param modifyInternalHostCountIntentParam Payload for Modify internal host count for given cluster + // @return Activity accepted for processing + // + // @throws InvalidRequest Bad Request + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + // @throws NotFound Not Found + ModifyInternalHostCount(orgIdParam string, deploymentIdParam string, modifyInternalHostCountIntentParam vmwarecloudVmc_aws_cho_providerModel.ModifyInternalHostCountIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) +} + +type deploymentIdmodifyInternalHostCountClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewDeploymentIdmodifyInternalHostCountClient(connector vapiProtocolClient_.Connector) *deploymentIdmodifyInternalHostCountClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_idmodify_internal_host_count") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "modify_internal_host_count": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "modify_internal_host_count"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + dIface := deploymentIdmodifyInternalHostCountClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &dIface +} + +func (dIface *deploymentIdmodifyInternalHostCountClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := dIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (dIface *deploymentIdmodifyInternalHostCountClient) ModifyInternalHostCount(orgIdParam string, deploymentIdParam string, modifyInternalHostCountIntentParam vmwarecloudVmc_aws_cho_providerModel.ModifyInternalHostCountIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) { + typeConverter := dIface.connector.TypeConverter() + executionContext := dIface.connector.NewExecutionContext() + operationRestMetaData := deploymentIdmodifyInternalHostCountModifyInternalHostCountRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(deploymentIdmodifyInternalHostCountModifyInternalHostCountInputType(), typeConverter) + sv.AddStructField("OrgId", orgIdParam) + sv.AddStructField("DeploymentId", deploymentIdParam) + sv.AddStructField("ModifyInternalHostCountIntent", modifyInternalHostCountIntentParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := dIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_idmodify_internal_host_count", "modify_internal_host_count", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), DeploymentIdmodifyInternalHostCountModifyInternalHostCountOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.ActivityResponse), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), dIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountTypes.go new file mode 100644 index 000000000..d5dc4e8ca --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmodifyInternalHostCountTypes.go @@ -0,0 +1,83 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: DeploymentIdmodifyInternalHostCount. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package deployments + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func deploymentIdmodifyInternalHostCountModifyInternalHostCountInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["modify_internal_host_count_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ModifyInternalHostCountIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["modify_internal_host_count_intent"] = "ModifyInternalHostCountIntent" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func DeploymentIdmodifyInternalHostCountModifyInternalHostCountOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ActivityResponseBindingType) +} + +func deploymentIdmodifyInternalHostCountModifyInternalHostCountRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["modify_internal_host_count_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ModifyInternalHostCountIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["modify_internal_host_count_intent"] = "ModifyInternalHostCountIntent" + paramsTypeMap["modify_internal_host_count_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ModifyInternalHostCountIntentBindingType) + paramsTypeMap["org_id"] = vapiBindings_.NewStringType() + paramsTypeMap["deployment_id"] = vapiBindings_.NewStringType() + paramsTypeMap["orgId"] = vapiBindings_.NewStringType() + paramsTypeMap["deploymentId"] = vapiBindings_.NewStringType() + pathParams["deployment_id"] = "deploymentId" + pathParams["org_id"] = "orgId" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "modify_internal_host_count_intent", + "POST", + "/api/inventory/{orgId}/vmc-aws/deployments/{deploymentId}:modify-internal-host-count", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.invalid_request": 400, "com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403, "com.vmware.vapi.std.errors.not_found": 404}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishClient.go new file mode 100644 index 000000000..76c99668c --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishClient.go @@ -0,0 +1,94 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: DeploymentIdmsftLicensingPublish +// Used by client-side stubs. + +package deployments + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type DeploymentIdmsftLicensingPublishClient interface { + + // Enables Microsoft Server Licenses provided by VMware + // + // @param orgIdParam organization identifier + // @param deploymentIdParam deployment identifier + // @param publishMsftLicenseIntentParam Payload for Publish Microsoft licenses config on cluster + // @return Activity accepted for processing + // + // @throws InvalidRequest Bad Request + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + // @throws NotFound Not Found + PublishMicrosoftServerLicenses(orgIdParam string, deploymentIdParam string, publishMsftLicenseIntentParam vmwarecloudVmc_aws_cho_providerModel.PublishMsftLicenseIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) +} + +type deploymentIdmsftLicensingPublishClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewDeploymentIdmsftLicensingPublishClient(connector vapiProtocolClient_.Connector) *deploymentIdmsftLicensingPublishClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_idmsft_licensing_publish") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "publish_microsoft_server_licenses": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "publish_microsoft_server_licenses"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + dIface := deploymentIdmsftLicensingPublishClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &dIface +} + +func (dIface *deploymentIdmsftLicensingPublishClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := dIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (dIface *deploymentIdmsftLicensingPublishClient) PublishMicrosoftServerLicenses(orgIdParam string, deploymentIdParam string, publishMsftLicenseIntentParam vmwarecloudVmc_aws_cho_providerModel.PublishMsftLicenseIntent) (vmwarecloudVmc_aws_cho_providerModel.ActivityResponse, error) { + typeConverter := dIface.connector.TypeConverter() + executionContext := dIface.connector.NewExecutionContext() + operationRestMetaData := deploymentIdmsftLicensingPublishPublishMicrosoftServerLicensesRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(deploymentIdmsftLicensingPublishPublishMicrosoftServerLicensesInputType(), typeConverter) + sv.AddStructField("OrgId", orgIdParam) + sv.AddStructField("DeploymentId", deploymentIdParam) + sv.AddStructField("PublishMsftLicenseIntent", publishMsftLicenseIntentParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + return emptyOutput, vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := dIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments.deployment_idmsft_licensing_publish", "publish_microsoft_server_licenses", inputDataValue, executionContext) + var emptyOutput vmwarecloudVmc_aws_cho_providerModel.ActivityResponse + if methodResult.IsSuccess() { + output, errorInOutput := typeConverter.ConvertToGolang(methodResult.Output(), DeploymentIdmsftLicensingPublishPublishMicrosoftServerLicensesOutputType()) + if errorInOutput != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInOutput) + } + return output.(vmwarecloudVmc_aws_cho_providerModel.ActivityResponse), nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), dIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return emptyOutput, vapiBindings_.VAPIerrorsToError(errorInError) + } + return emptyOutput, methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishTypes.go new file mode 100644 index 000000000..00acc7037 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentIdmsftLicensingPublishTypes.go @@ -0,0 +1,83 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: DeploymentIdmsftLicensingPublish. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package deployments + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func deploymentIdmsftLicensingPublishPublishMicrosoftServerLicensesInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["publish_msft_license_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.PublishMsftLicenseIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["publish_msft_license_intent"] = "PublishMsftLicenseIntent" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func DeploymentIdmsftLicensingPublishPublishMicrosoftServerLicensesOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.ActivityResponseBindingType) +} + +func deploymentIdmsftLicensingPublishPublishMicrosoftServerLicensesRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["org_id"] = vapiBindings_.NewStringType() + fields["deployment_id"] = vapiBindings_.NewStringType() + fields["publish_msft_license_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.PublishMsftLicenseIntentBindingType) + fieldNameMap["org_id"] = "OrgId" + fieldNameMap["deployment_id"] = "DeploymentId" + fieldNameMap["publish_msft_license_intent"] = "PublishMsftLicenseIntent" + paramsTypeMap["publish_msft_license_intent"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.PublishMsftLicenseIntentBindingType) + paramsTypeMap["org_id"] = vapiBindings_.NewStringType() + paramsTypeMap["deployment_id"] = vapiBindings_.NewStringType() + paramsTypeMap["orgId"] = vapiBindings_.NewStringType() + paramsTypeMap["deploymentId"] = vapiBindings_.NewStringType() + pathParams["deployment_id"] = "deploymentId" + pathParams["org_id"] = "orgId" + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "publish_msft_license_intent", + "POST", + "/api/inventory/{orgId}/vmc-aws/deployments/{deploymentId}:msft-licensing-publish", + "application/json", + resultHeaders, + 200, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.invalid_request": 400, "com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403, "com.vmware.vapi.std.errors.not_found": 404}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentsPackageTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentsPackageTypes.go new file mode 100644 index 000000000..15938ed0a --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/deployments/DeploymentsPackageTypes.go @@ -0,0 +1,11 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for package: com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.deployments. +// Includes binding types of a top level structures and enumerations. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package deployments diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/RulesPackageTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/RulesPackageTypes.go new file mode 100644 index 000000000..ac675b4b9 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/RulesPackageTypes.go @@ -0,0 +1,11 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for package: com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.workflow.rules. +// Includes binding types of a top level structures and enumerations. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package rules diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteClient.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteClient.go new file mode 100644 index 000000000..73082b423 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteClient.go @@ -0,0 +1,82 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Interface file for service: Versionpromote +// Used by client-side stubs. + +package rules + +import ( + vapiStdErrors_ "github.com/vmware/vsphere-automation-sdk-go/lib/vapi/std/errors" + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiCore_ "github.com/vmware/vsphere-automation-sdk-go/runtime/core" + vapiProtocolClient_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol/client" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" +) + +const _ = vapiCore_.SupportedByRuntimeVersion2 + +type VersionpromoteClient interface { + + // Promote rule version. + // + // @param ruleVersionPromotionPayloadParam Payload for promoting the rule version + // @return OK + // + // @throws Unauthenticated Unauthorized + // @throws Unauthorized Forbidden + PromoteRuleVersion(ruleVersionPromotionPayloadParam vmwarecloudVmc_aws_cho_providerModel.RuleVersionPromotionPayload) error +} + +type versionpromoteClient struct { + connector vapiProtocolClient_.Connector + interfaceDefinition vapiCore_.InterfaceDefinition + errorsBindingMap map[string]vapiBindings_.BindingType +} + +func NewVersionpromoteClient(connector vapiProtocolClient_.Connector) *versionpromoteClient { + interfaceIdentifier := vapiCore_.NewInterfaceIdentifier("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.workflow.rules.versionpromote") + methodIdentifiers := map[string]vapiCore_.MethodIdentifier{ + "promote_rule_version": vapiCore_.NewMethodIdentifier(interfaceIdentifier, "promote_rule_version"), + } + interfaceDefinition := vapiCore_.NewInterfaceDefinition(interfaceIdentifier, methodIdentifiers) + errorsBindingMap := make(map[string]vapiBindings_.BindingType) + + vIface := versionpromoteClient{interfaceDefinition: interfaceDefinition, errorsBindingMap: errorsBindingMap, connector: connector} + return &vIface +} + +func (vIface *versionpromoteClient) GetErrorBindingType(errorName string) vapiBindings_.BindingType { + if entry, ok := vIface.errorsBindingMap[errorName]; ok { + return entry + } + return vapiStdErrors_.ERROR_BINDINGS_MAP[errorName] +} + +func (vIface *versionpromoteClient) PromoteRuleVersion(ruleVersionPromotionPayloadParam vmwarecloudVmc_aws_cho_providerModel.RuleVersionPromotionPayload) error { + typeConverter := vIface.connector.TypeConverter() + executionContext := vIface.connector.NewExecutionContext() + operationRestMetaData := versionpromotePromoteRuleVersionRestMetadata() + executionContext.SetConnectionMetadata(vapiCore_.RESTMetadataKey, operationRestMetaData) + executionContext.SetConnectionMetadata(vapiCore_.ResponseTypeKey, vapiCore_.NewResponseType(true, false)) + + sv := vapiBindings_.NewStructValueBuilder(versionpromotePromoteRuleVersionInputType(), typeConverter) + sv.AddStructField("RuleVersionPromotionPayload", ruleVersionPromotionPayloadParam) + inputDataValue, inputError := sv.GetStructValue() + if inputError != nil { + return vapiBindings_.VAPIerrorsToError(inputError) + } + + methodResult := vIface.connector.GetApiProvider().Invoke("com.vmware.vmwarecloud.vmc_aws_cho_provider.api.inventory.vmc_aws.workflow.rules.versionpromote", "promote_rule_version", inputDataValue, executionContext) + if methodResult.IsSuccess() { + return nil + } else { + methodError, errorInError := typeConverter.ConvertToGolang(methodResult.Error(), vIface.GetErrorBindingType(methodResult.Error().Name())) + if errorInError != nil { + return vapiBindings_.VAPIerrorsToError(errorInError) + } + return methodError.(error) + } +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteTypes.go new file mode 100644 index 000000000..d098d2309 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/api/inventory/vmc_aws/workflow/rules/VersionpromoteTypes.go @@ -0,0 +1,69 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for service: Versionpromote. +// Includes binding types of a structures and enumerations defined in the service. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package rules + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiProtocol_ "github.com/vmware/vsphere-automation-sdk-go/runtime/protocol" + vmwarecloudVmc_aws_cho_providerModel "github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider/model" + "reflect" +) + +func versionpromotePromoteRuleVersionInputType() vapiBindings_.StructType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["rule_version_promotion_payload"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.RuleVersionPromotionPayloadBindingType) + fieldNameMap["rule_version_promotion_payload"] = "RuleVersionPromotionPayload" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("operation-input", fields, reflect.TypeOf(vapiData_.StructValue{}), fieldNameMap, validators) +} + +func VersionpromotePromoteRuleVersionOutputType() vapiBindings_.BindingType { + return vapiBindings_.NewVoidType() +} + +func versionpromotePromoteRuleVersionRestMetadata() vapiProtocol_.OperationRestMetadata { + fields := map[string]vapiBindings_.BindingType{} + fieldNameMap := map[string]string{} + paramsTypeMap := map[string]vapiBindings_.BindingType{} + pathParams := map[string]string{} + queryParams := map[string]string{} + headerParams := map[string]string{} + dispatchHeaderParams := map[string]string{} + bodyFieldsMap := map[string]string{} + fields["rule_version_promotion_payload"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.RuleVersionPromotionPayloadBindingType) + fieldNameMap["rule_version_promotion_payload"] = "RuleVersionPromotionPayload" + paramsTypeMap["rule_version_promotion_payload"] = vapiBindings_.NewReferenceType(vmwarecloudVmc_aws_cho_providerModel.RuleVersionPromotionPayloadBindingType) + resultHeaders := map[string]string{} + errorHeaders := map[string]map[string]string{} + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"] = make(map[string]string) + errorHeaders["com.vmware.vapi.std.errors.unauthenticated"]["challenge"] = "WWW-Authenticate" + return vapiProtocol_.NewOperationRestMetadata( + fields, + fieldNameMap, + paramsTypeMap, + pathParams, + queryParams, + headerParams, + dispatchHeaderParams, + bodyFieldsMap, + "", + "rule_version_promotion_payload", + "POST", + "/api/inventory/vmc-aws/workflow/rules/version:promote", + "application/json", + resultHeaders, + 204, + "", + errorHeaders, + map[string]int{"com.vmware.vapi.std.errors.unauthenticated": 401, "com.vmware.vapi.std.errors.unauthorized": 403}) +} diff --git a/services/vmwarecloud/vmc_aws_cho_provider/go.mod b/services/vmwarecloud/vmc_aws_cho_provider/go.mod new file mode 100644 index 000000000..987f9613f --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/go.mod @@ -0,0 +1,16 @@ +module github.com/vmware/vsphere-automation-sdk-go/services/vmwarecloud/vmc_aws_cho_provider + +go 1.17 + +require ( + github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0 + github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.0 +) + +require ( + github.com/beevik/etree v1.1.0 // indirect + github.com/gibson042/canonicaljson-go v1.0.3 // indirect + github.com/golang-jwt/jwt/v4 v4.3.0 // indirect + github.com/google/uuid v1.2.0 // indirect + golang.org/x/text v0.3.8 // indirect +) diff --git a/services/vmwarecloud/vmc_aws_cho_provider/go.sum b/services/vmwarecloud/vmc_aws_cho_provider/go.sum new file mode 100644 index 000000000..979b19d50 --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/go.sum @@ -0,0 +1,53 @@ +github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs= +github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gibson042/canonicaljson-go v1.0.3 h1:EAyF8L74AWabkyUmrvEFHEt/AGFQeD6RfwbAuf0j1bI= +github.com/gibson042/canonicaljson-go v1.0.3/go.mod h1:DsLpJTThXyGNO+KZlI85C1/KDcImpP67k/RKVjcaEqo= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0 h1:pT+oqJ8FD5eUBQkl+e7LZwwtbwPvW5kDyyGXvt66gOM= +github.com/vmware/vsphere-automation-sdk-go/lib v0.7.0/go.mod h1:f3+6YVZpNcK2pYyiQ94BoHWmjMj9BnYav0vNFuTiDVM= +github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.0 h1:pSBxa9Agh6bgW8Hr0A1eQxuwnxGTnuAVox8iQb023hg= +github.com/vmware/vsphere-automation-sdk-go/runtime v0.7.0/go.mod h1:qdzEFm2iK3dvlmm99EYYNxs70HbzuiHyENFD24Ps8fQ= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/services/vmwarecloud/vmc_aws_cho_provider/model/ModelPackageTypes.go b/services/vmwarecloud/vmc_aws_cho_provider/model/ModelPackageTypes.go new file mode 100644 index 000000000..88d5be67e --- /dev/null +++ b/services/vmwarecloud/vmc_aws_cho_provider/model/ModelPackageTypes.go @@ -0,0 +1,796 @@ +// Copyright © 2019-2023 VMware, Inc. All Rights Reserved. +// SPDX-License-Identifier: BSD-2-Clause + +// Auto generated code. DO NOT EDIT. + +// Data type definitions file for package: com.vmware.vmwarecloud.vmc_aws_cho_provider.model. +// Includes binding types of a top level structures and enumerations. +// Shared by client-side stubs and server-side skeletons to ensure type +// compatibility. + +package model + +import ( + vapiBindings_ "github.com/vmware/vsphere-automation-sdk-go/runtime/bindings" + vapiData_ "github.com/vmware/vsphere-automation-sdk-go/runtime/data" + vapiLog_ "github.com/vmware/vsphere-automation-sdk-go/runtime/log" + "reflect" +) + +// Response of Activity API +type ActivityResponse struct { + // ID of the create activity. + Id *string + // Org id associated with the activity. + OrgId *string + // Resource ID on which activity is performed. + ResourceId *string +} + +func (s *ActivityResponse) GetType__() vapiBindings_.BindingType { + return ActivityResponseBindingType() +} + +func (s *ActivityResponse) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for ActivityResponse._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type DeleteHostIntent struct { + // The number of hosts to delete. + NumHosts int64 + // The cluster id from which the host(s) shall be deleted. + ClusterId string + // A list of Host IDs to be removed from cluster + HostIds []string +} + +func (s *DeleteHostIntent) GetType__() vapiBindings_.BindingType { + return DeleteHostIntentBindingType() +} + +func (s *DeleteHostIntent) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for DeleteHostIntent._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type DeleteHostInternalIntent struct { + // The availability zone in which the host needs to be deleted. + AvailabilityZone *string + // To indicate context of a host provisioning. If internal, then host is not billable and if user, the host is billable to customer + HostOperationContext *string + DeleteHostReason *DeleteHostReason + RemoveType string + // The number of hosts to delete. + NumHosts int64 + // The cluster id from which the host(s) shall be deleted. + ClusterId string + // A list of Host IDs to be removed from cluster + HostIds []string +} + +// To indicate context of a host provisioning. If internal, then host is not billable and if user, the host is billable to customer +const DeleteHostInternalIntent_HOST_OPERATION_CONTEXT_INTERNAL = "INTERNAL" + +// To indicate context of a host provisioning. If internal, then host is not billable and if user, the host is billable to customer +const DeleteHostInternalIntent_HOST_OPERATION_CONTEXT_USER = "USER" + +// The remove type for the esx hosts +const DeleteHostInternalIntent_REMOVE_TYPE_REMOVE_TYPE_REMOVE = "remove" + +// The remove type for the esx hosts +const DeleteHostInternalIntent_REMOVE_TYPE_REMOVE_TYPE_DISCONNECTED_REMOVE = "disconnected-remove" + +// The remove type for the esx hosts +const DeleteHostInternalIntent_REMOVE_TYPE_REMOVE_TYPE_FORCE_REMOVE = "force-remove" + +func (s *DeleteHostInternalIntent) GetType__() vapiBindings_.BindingType { + return DeleteHostInternalIntentBindingType() +} + +func (s *DeleteHostInternalIntent) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for DeleteHostInternalIntent._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type AddClusterIntent struct { + // Number of hosts + NumHosts int64 + // Customize CPU cores on hosts in a cluster. Specify number of cores to be enabled on hosts in a cluster. + HostCpuCoresCount *int64 + HostInstanceType VmcAwsHostInstanceType + // A list of availability zones for cluster + AvailabilityZones []string + // Details about the vsan_version + VsanVersion *string +} + +// Details about the vsan_version +const AddClusterIntent_VSAN_VERSION_VSAN1 = "vsan1" + +// Details about the vsan_version +const AddClusterIntent_VSAN_VERSION_VSANESA = "vsanesa" + +// Details about the vsan_version +const AddClusterIntent_VSAN_VERSION_NOVSAN = "novsan" + +func (s *AddClusterIntent) GetType__() vapiBindings_.BindingType { + return AddClusterIntentBindingType() +} + +func (s *AddClusterIntent) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for AddClusterIntent._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type PublishMsftLicenseIntent struct { + // The cluster id from which the host(s) shall be deleted. + ClusterId string + AwsLicensesMsft AwsLicensesMsftConfig +} + +func (s *PublishMsftLicenseIntent) GetType__() vapiBindings_.BindingType { + return PublishMsftLicenseIntentBindingType() +} + +func (s *PublishMsftLicenseIntent) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for PublishMsftLicenseIntent._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type RestError struct { + // Unique error occurrence identifier + Instance string + // HTTP status code + Status int64 + // Unique identifier for the type of error + Type_ string + // Array of error messages + Messages []ErrorMessage +} + +func (s *RestError) GetType__() vapiBindings_.BindingType { + return RestErrorBindingType() +} + +func (s *RestError) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for RestError._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type ModifyInternalHostCountIntent struct { + // The cluster id from which the internal host count shall be modified. + ClusterId string + // increment for increase internal host count, decrement for decrease internal host count + Action string +} + +func (s *ModifyInternalHostCountIntent) GetType__() vapiBindings_.BindingType { + return ModifyInternalHostCountIntentBindingType() +} + +func (s *ModifyInternalHostCountIntent) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for ModifyInternalHostCountIntent._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +// Maintenance host definition +type MaintenanceHost struct { + // ID of MaintenanceHost. + Id *string + // ID of the durable host. + DurableHostId *string + // Org id associated with the MaintenanceHost. + OrgId *string + // ID of the deployment. + DeploymentId *string + // Id of the cluster + ClusterId *string + // AWS region of SPLA + AwsRegion *string +} + +func (s *MaintenanceHost) GetType__() vapiBindings_.BindingType { + return MaintenanceHostBindingType() +} + +func (s *MaintenanceHost) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for MaintenanceHost._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +// SPLA maintenance hosts info +type SplaMaintenanceHostsInfo struct { + // AWS region of SPLA + AwsRegion *string + // A list of MaintenanceHost object + DurableIdentifiers []MaintenanceHost +} + +func (s *SplaMaintenanceHostsInfo) GetType__() vapiBindings_.BindingType { + return SplaMaintenanceHostsInfoBindingType() +} + +func (s *SplaMaintenanceHostsInfo) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for SplaMaintenanceHostsInfo._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type DeleteClusterIntent struct { + // The cluster id that should be deleted. + ClusterId string +} + +func (s *DeleteClusterIntent) GetType__() vapiBindings_.BindingType { + return DeleteClusterIntentBindingType() +} + +func (s *DeleteClusterIntent) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for DeleteClusterIntent._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type WorkflowRoutingPayload struct { + ClusterType string + FeatureType *FeatureType + InstanceType *WorkflowInstanceType + WorkflowName string + SourceOfTruth string +} + +// Cluster Type +const WorkflowRoutingPayload_CLUSTER_TYPE_CLUSTER_TYPE_1NODE = "1NODE" + +// Cluster Type +const WorkflowRoutingPayload_CLUSTER_TYPE_CLUSTER_TYPE_2NODE = "2NODE" + +// Cluster Type +const WorkflowRoutingPayload_CLUSTER_TYPE_CLUSTER_TYPE_STANDARD = "STANDARD" + +// Cluster Type +const WorkflowRoutingPayload_CLUSTER_TYPE_CLUSTER_TYPE_MULTI_AZ = "MULTI_AZ" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_SDDC_PROVISION = "SDDC_PROVISION" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_SDDC_DELETE = "SDDC_DELETE" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_CLUSTER_CREATE = "CLUSTER_CREATE" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_TWO_NODE_CLUSTER_CREATE = "TWO_NODE_CLUSTER_CREATE" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_ONE_NODE_CLUSTER_CREATE = "ONE_NODE_CLUSTER_CREATE" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_ADD_HOST = "ADD_HOST" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_REMOVE_HOST = "REMOVE_HOST" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_DELETE_CLUSTER = "DELETE_CLUSTER" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_TWO_NODE_DELETE_CLUSTER = "TWO_NODE_DELETE_CLUSTER" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_ONE_NODE_DELETE_CLUSTER = "ONE_NODE_DELETE_CLUSTER" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_SCALE_UP = "SCALE_UP" + +// Type of workflow +const WorkflowRoutingPayload_WORKFLOW_NAME_WORKFLOW_NAME_SCALE_DOWN = "SCALE_DOWN" + +// Source Of Truth +const WorkflowRoutingPayload_SOURCE_OF_TRUTH_SOURCE_OF_TRUTH_V1 = "V1" + +// Source Of Truth +const WorkflowRoutingPayload_SOURCE_OF_TRUTH_SOURCE_OF_TRUTH_V2 = "V2" + +// Source Of Truth +const WorkflowRoutingPayload_SOURCE_OF_TRUTH_SOURCE_OF_TRUTH_NA = "NA" + +func (s *WorkflowRoutingPayload) GetType__() vapiBindings_.BindingType { + return WorkflowRoutingPayloadBindingType() +} + +func (s *WorkflowRoutingPayload) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for WorkflowRoutingPayload._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type WorkflowDestinationResponse struct { + Destination *string +} + +// Workflow route type +const WorkflowDestinationResponse_DESTINATION_WORKFLOW_ROUTE_TYPE_V1 = "V1" + +// Workflow route type +const WorkflowDestinationResponse_DESTINATION_WORKFLOW_ROUTE_TYPE_V2 = "V2" + +func (s *WorkflowDestinationResponse) GetType__() vapiBindings_.BindingType { + return WorkflowDestinationResponseBindingType() +} + +func (s *WorkflowDestinationResponse) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for WorkflowDestinationResponse._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type RuleVersionPromotionPayload struct { + RuleType string + // Rule version + Version int64 +} + +// Version Type +const RuleVersionPromotionPayload_RULE_TYPE_RULE_VERSION_TYPE_SNAPSHOT = "SNAPSHOT" + +// Version Type +const RuleVersionPromotionPayload_RULE_TYPE_RULE_VERSION_TYPE_RELEASE = "RELEASE" + +func (s *RuleVersionPromotionPayload) GetType__() vapiBindings_.BindingType { + return RuleVersionPromotionPayloadBindingType() +} + +func (s *RuleVersionPromotionPayload) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for RuleVersionPromotionPayload._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type DeleteHostReason struct { +} + +func (s *DeleteHostReason) GetType__() vapiBindings_.BindingType { + return DeleteHostReasonBindingType() +} + +func (s *DeleteHostReason) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for DeleteHostReason._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type VmcAwsHostInstanceType struct { +} + +func (s *VmcAwsHostInstanceType) GetType__() vapiBindings_.BindingType { + return VmcAwsHostInstanceTypeBindingType() +} + +func (s *VmcAwsHostInstanceType) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for VmcAwsHostInstanceType._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +// The SPLA licensing configuration for the cluster +type AwsLicensesMsftConfig struct { + // Windows Server license config + WindowsLicensing *string + // SQL Server license config + MssqlLicensing *string + // Academic institution recognized by Microsoft + Academic bool +} + +// Windows Server license config +const AwsLicensesMsftConfig_WINDOWS_LICENSING_DISABLED = "DISABLED" + +// Windows Server license config +const AwsLicensesMsftConfig_WINDOWS_LICENSING_ENABLED = "ENABLED" + +// Windows Server license config +const AwsLicensesMsftConfig_WINDOWS_LICENSING_CUSTOMER_SUPPLIED = "CUSTOMER_SUPPLIED" + +// SQL Server license config +const AwsLicensesMsftConfig_MSSQL_LICENSING_DISABLED = "DISABLED" + +// SQL Server license config +const AwsLicensesMsftConfig_MSSQL_LICENSING_ENABLED = "ENABLED" + +// SQL Server license config +const AwsLicensesMsftConfig_MSSQL_LICENSING_CUSTOMER_SUPPLIED = "CUSTOMER_SUPPLIED" + +func (s *AwsLicensesMsftConfig) GetType__() vapiBindings_.BindingType { + return AwsLicensesMsftConfigBindingType() +} + +func (s *AwsLicensesMsftConfig) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for AwsLicensesMsftConfig._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type ErrorMessage struct { + // Globally resolvable bundle key. + Id string + // Error message. + Message string + // Additional information to further contextualize the error. + Source *string + Args []string +} + +func (s *ErrorMessage) GetType__() vapiBindings_.BindingType { + return ErrorMessageBindingType() +} + +func (s *ErrorMessage) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for ErrorMessage._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type FeatureType struct { +} + +func (s *FeatureType) GetType__() vapiBindings_.BindingType { + return FeatureTypeBindingType() +} + +func (s *FeatureType) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for FeatureType._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +type WorkflowInstanceType struct { +} + +func (s *WorkflowInstanceType) GetType__() vapiBindings_.BindingType { + return WorkflowInstanceTypeBindingType() +} + +func (s *WorkflowInstanceType) GetDataValue__() (vapiData_.DataValue, []error) { + typeConverter := vapiBindings_.NewTypeConverter() + dataVal, err := typeConverter.ConvertToVapi(s, s.GetType__()) + if err != nil { + vapiLog_.Errorf("Error in ConvertToVapi for WorkflowInstanceType._GetDataValue method - %s", + vapiBindings_.VAPIerrorsToError(err).Error()) + return nil, err + } + return dataVal, nil +} + +func ActivityResponseBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["id"] = "Id" + fields["org_id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["org_id"] = "OrgId" + fields["resource_id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["resource_id"] = "ResourceId" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.activity_response", fields, reflect.TypeOf(ActivityResponse{}), fieldNameMap, validators) +} + +func DeleteHostIntentBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["num_hosts"] = vapiBindings_.NewIntegerType() + fieldNameMap["num_hosts"] = "NumHosts" + fields["cluster_id"] = vapiBindings_.NewStringType() + fieldNameMap["cluster_id"] = "ClusterId" + fields["host_ids"] = vapiBindings_.NewOptionalType(vapiBindings_.NewListType(vapiBindings_.NewStringType(), reflect.TypeOf([]string{}))) + fieldNameMap["host_ids"] = "HostIds" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.delete_host_intent", fields, reflect.TypeOf(DeleteHostIntent{}), fieldNameMap, validators) +} + +func DeleteHostInternalIntentBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["availability_zone"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["availability_zone"] = "AvailabilityZone" + fields["host_operation_context"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["host_operation_context"] = "HostOperationContext" + fields["delete_host_reason"] = vapiBindings_.NewOptionalType(vapiBindings_.NewReferenceType(DeleteHostReasonBindingType)) + fieldNameMap["delete_host_reason"] = "DeleteHostReason" + fields["remove_type"] = vapiBindings_.NewStringType() + fieldNameMap["remove_type"] = "RemoveType" + fields["num_hosts"] = vapiBindings_.NewIntegerType() + fieldNameMap["num_hosts"] = "NumHosts" + fields["cluster_id"] = vapiBindings_.NewStringType() + fieldNameMap["cluster_id"] = "ClusterId" + fields["host_ids"] = vapiBindings_.NewOptionalType(vapiBindings_.NewListType(vapiBindings_.NewStringType(), reflect.TypeOf([]string{}))) + fieldNameMap["host_ids"] = "HostIds" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.delete_host_internal_intent", fields, reflect.TypeOf(DeleteHostInternalIntent{}), fieldNameMap, validators) +} + +func AddClusterIntentBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["num_hosts"] = vapiBindings_.NewIntegerType() + fieldNameMap["num_hosts"] = "NumHosts" + fields["host_cpu_cores_count"] = vapiBindings_.NewOptionalType(vapiBindings_.NewIntegerType()) + fieldNameMap["host_cpu_cores_count"] = "HostCpuCoresCount" + fields["host_instance_type"] = vapiBindings_.NewReferenceType(VmcAwsHostInstanceTypeBindingType) + fieldNameMap["host_instance_type"] = "HostInstanceType" + fields["availability_zones"] = vapiBindings_.NewOptionalType(vapiBindings_.NewListType(vapiBindings_.NewStringType(), reflect.TypeOf([]string{}))) + fieldNameMap["availability_zones"] = "AvailabilityZones" + fields["vsan_version"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["vsan_version"] = "VsanVersion" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.add_cluster_intent", fields, reflect.TypeOf(AddClusterIntent{}), fieldNameMap, validators) +} + +func PublishMsftLicenseIntentBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["cluster_id"] = vapiBindings_.NewStringType() + fieldNameMap["cluster_id"] = "ClusterId" + fields["aws_licenses_msft"] = vapiBindings_.NewReferenceType(AwsLicensesMsftConfigBindingType) + fieldNameMap["aws_licenses_msft"] = "AwsLicensesMsft" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.publish_msft_license_intent", fields, reflect.TypeOf(PublishMsftLicenseIntent{}), fieldNameMap, validators) +} + +func RestErrorBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["instance"] = vapiBindings_.NewStringType() + fieldNameMap["instance"] = "Instance" + fields["status"] = vapiBindings_.NewIntegerType() + fieldNameMap["status"] = "Status" + fields["type"] = vapiBindings_.NewStringType() + fieldNameMap["type"] = "Type_" + fields["messages"] = vapiBindings_.NewOptionalType(vapiBindings_.NewListType(vapiBindings_.NewReferenceType(ErrorMessageBindingType), reflect.TypeOf([]ErrorMessage{}))) + fieldNameMap["messages"] = "Messages" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.rest_error", fields, reflect.TypeOf(RestError{}), fieldNameMap, validators) +} + +func ModifyInternalHostCountIntentBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["cluster_id"] = vapiBindings_.NewStringType() + fieldNameMap["cluster_id"] = "ClusterId" + fields["action"] = vapiBindings_.NewStringType() + fieldNameMap["action"] = "Action" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.modify_internal_host_count_intent", fields, reflect.TypeOf(ModifyInternalHostCountIntent{}), fieldNameMap, validators) +} + +func MaintenanceHostBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["id"] = "Id" + fields["durable_host_id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["durable_host_id"] = "DurableHostId" + fields["org_id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["org_id"] = "OrgId" + fields["deployment_id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["deployment_id"] = "DeploymentId" + fields["cluster_id"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["cluster_id"] = "ClusterId" + fields["aws_region"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["aws_region"] = "AwsRegion" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.maintenance_host", fields, reflect.TypeOf(MaintenanceHost{}), fieldNameMap, validators) +} + +func SplaMaintenanceHostsInfoBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["aws_region"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["aws_region"] = "AwsRegion" + fields["durable_identifiers"] = vapiBindings_.NewOptionalType(vapiBindings_.NewListType(vapiBindings_.NewReferenceType(MaintenanceHostBindingType), reflect.TypeOf([]MaintenanceHost{}))) + fieldNameMap["durable_identifiers"] = "DurableIdentifiers" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.spla_maintenance_hosts_info", fields, reflect.TypeOf(SplaMaintenanceHostsInfo{}), fieldNameMap, validators) +} + +func DeleteClusterIntentBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["cluster_id"] = vapiBindings_.NewStringType() + fieldNameMap["cluster_id"] = "ClusterId" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.delete_cluster_intent", fields, reflect.TypeOf(DeleteClusterIntent{}), fieldNameMap, validators) +} + +func WorkflowRoutingPayloadBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["cluster_type"] = vapiBindings_.NewStringType() + fieldNameMap["cluster_type"] = "ClusterType" + fields["feature_type"] = vapiBindings_.NewOptionalType(vapiBindings_.NewReferenceType(FeatureTypeBindingType)) + fieldNameMap["feature_type"] = "FeatureType" + fields["instance_type"] = vapiBindings_.NewOptionalType(vapiBindings_.NewReferenceType(WorkflowInstanceTypeBindingType)) + fieldNameMap["instance_type"] = "InstanceType" + fields["workflow_name"] = vapiBindings_.NewStringType() + fieldNameMap["workflow_name"] = "WorkflowName" + fields["source_of_truth"] = vapiBindings_.NewStringType() + fieldNameMap["source_of_truth"] = "SourceOfTruth" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.workflow_routing_payload", fields, reflect.TypeOf(WorkflowRoutingPayload{}), fieldNameMap, validators) +} + +func WorkflowDestinationResponseBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["destination"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["destination"] = "Destination" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.workflow_destination_response", fields, reflect.TypeOf(WorkflowDestinationResponse{}), fieldNameMap, validators) +} + +func RuleVersionPromotionPayloadBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["rule_type"] = vapiBindings_.NewStringType() + fieldNameMap["rule_type"] = "RuleType" + fields["version"] = vapiBindings_.NewIntegerType() + fieldNameMap["version"] = "Version" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.rule_version_promotion_payload", fields, reflect.TypeOf(RuleVersionPromotionPayload{}), fieldNameMap, validators) +} + +func DeleteHostReasonBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.delete_host_reason", fields, reflect.TypeOf(DeleteHostReason{}), fieldNameMap, validators) +} + +func VmcAwsHostInstanceTypeBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.vmc_aws_host_instance_type", fields, reflect.TypeOf(VmcAwsHostInstanceType{}), fieldNameMap, validators) +} + +func AwsLicensesMsftConfigBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["windows_licensing"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["windows_licensing"] = "WindowsLicensing" + fields["mssql_licensing"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["mssql_licensing"] = "MssqlLicensing" + fields["academic"] = vapiBindings_.NewBooleanType() + fieldNameMap["academic"] = "Academic" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.aws_licenses_msft_config", fields, reflect.TypeOf(AwsLicensesMsftConfig{}), fieldNameMap, validators) +} + +func ErrorMessageBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + fields["id"] = vapiBindings_.NewStringType() + fieldNameMap["id"] = "Id" + fields["message"] = vapiBindings_.NewStringType() + fieldNameMap["message"] = "Message" + fields["source"] = vapiBindings_.NewOptionalType(vapiBindings_.NewStringType()) + fieldNameMap["source"] = "Source" + fields["args"] = vapiBindings_.NewOptionalType(vapiBindings_.NewListType(vapiBindings_.NewStringType(), reflect.TypeOf([]string{}))) + fieldNameMap["args"] = "Args" + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.error_message", fields, reflect.TypeOf(ErrorMessage{}), fieldNameMap, validators) +} + +func FeatureTypeBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.feature_type", fields, reflect.TypeOf(FeatureType{}), fieldNameMap, validators) +} + +func WorkflowInstanceTypeBindingType() vapiBindings_.BindingType { + fields := make(map[string]vapiBindings_.BindingType) + fieldNameMap := make(map[string]string) + var validators = []vapiBindings_.Validator{} + return vapiBindings_.NewStructType("com.vmware.vmwarecloud.vmc_aws_cho_provider.model.workflow_instance_type", fields, reflect.TypeOf(WorkflowInstanceType{}), fieldNameMap, validators) +}