diff --git a/catalogmanagementv1/catalog_management_v1.go b/catalogmanagementv1/catalog_management_v1.go index 04ab3739..16f25e81 100644 --- a/catalogmanagementv1/catalog_management_v1.go +++ b/catalogmanagementv1/catalog_management_v1.go @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.55.1-b24c7487-20220831-201343 + * IBM OpenAPI SDK Code Generator Version: 3.68.2-ac7def68-20230310-195410 */ // Package catalogmanagementv1 : Operations and models for the CatalogManagementV1 service @@ -28,6 +28,7 @@ import ( "io" "net/http" "reflect" + "strconv" "strings" "time" @@ -554,12 +555,6 @@ func (catalogManagement *CatalogManagementV1) CreateCatalogWithContext(ctx conte builder.AddHeader("Content-Type", "application/json") body := make(map[string]interface{}) - if createCatalogOptions.ID != nil { - body["id"] = createCatalogOptions.ID - } - if createCatalogOptions.Rev != nil { - body["_rev"] = createCatalogOptions.Rev - } if createCatalogOptions.Label != nil { body["label"] = createCatalogOptions.Label } @@ -575,6 +570,9 @@ func (catalogManagement *CatalogManagementV1) CreateCatalogWithContext(ctx conte if createCatalogOptions.CatalogIconURL != nil { body["catalog_icon_url"] = createCatalogOptions.CatalogIconURL } + if createCatalogOptions.CatalogBannerURL != nil { + body["catalog_banner_url"] = createCatalogOptions.CatalogBannerURL + } if createCatalogOptions.Tags != nil { body["tags"] = createCatalogOptions.Tags } @@ -750,6 +748,9 @@ func (catalogManagement *CatalogManagementV1) ReplaceCatalogWithContext(ctx cont if replaceCatalogOptions.CatalogIconURL != nil { body["catalog_icon_url"] = replaceCatalogOptions.CatalogIconURL } + if replaceCatalogOptions.CatalogBannerURL != nil { + body["catalog_banner_url"] = replaceCatalogOptions.CatalogBannerURL + } if replaceCatalogOptions.Tags != nil { body["tags"] = replaceCatalogOptions.Tags } @@ -1315,12 +1316,6 @@ func (catalogManagement *CatalogManagementV1) CreateOfferingWithContext(ctx cont builder.AddHeader("Content-Type", "application/json") body := make(map[string]interface{}) - if createOfferingOptions.ID != nil { - body["id"] = createOfferingOptions.ID - } - if createOfferingOptions.Rev != nil { - body["_rev"] = createOfferingOptions.Rev - } if createOfferingOptions.URL != nil { body["url"] = createOfferingOptions.URL } @@ -2992,6 +2987,9 @@ func (catalogManagement *CatalogManagementV1) GetOfferingSourceWithContext(ctx c if getOfferingSourceOptions.Channel != nil { builder.AddQuery("channel", fmt.Sprint(*getOfferingSourceOptions.Channel)) } + if getOfferingSourceOptions.AsIs != nil { + builder.AddQuery("asIs", fmt.Sprint(*getOfferingSourceOptions.AsIs)) + } request, err := builder.Build() if err != nil { @@ -3773,12 +3771,15 @@ func (catalogManagement *CatalogManagementV1) DeleteVersionWithContext(ctx conte // DeprecateVersion : Deprecate version immediately - use /archive instead // Deprecate the specified version. +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) DeprecateVersion(deprecateVersionOptions *DeprecateVersionOptions) (response *core.DetailedResponse, err error) { return catalogManagement.DeprecateVersionWithContext(context.Background(), deprecateVersionOptions) } // DeprecateVersionWithContext is an alternate form of the DeprecateVersion method which supports a Context parameter +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) DeprecateVersionWithContext(ctx context.Context, deprecateVersionOptions *DeprecateVersionOptions) (response *core.DetailedResponse, err error) { + core.GetLogger().Warn("A deprecated operation has been invoked: DeprecateVersion") err = core.ValidateNotNil(deprecateVersionOptions, "deprecateVersionOptions cannot be nil") if err != nil { return @@ -3819,150 +3820,6 @@ func (catalogManagement *CatalogManagementV1) DeprecateVersionWithContext(ctx co return } -// AccountPublishVersion : Publish version to account members -// Publish the specified version so it is viewable by account members. -func (catalogManagement *CatalogManagementV1) AccountPublishVersion(accountPublishVersionOptions *AccountPublishVersionOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.AccountPublishVersionWithContext(context.Background(), accountPublishVersionOptions) -} - -// AccountPublishVersionWithContext is an alternate form of the AccountPublishVersion method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) AccountPublishVersionWithContext(ctx context.Context, accountPublishVersionOptions *AccountPublishVersionOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(accountPublishVersionOptions, "accountPublishVersionOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(accountPublishVersionOptions, "accountPublishVersionOptions") - if err != nil { - return - } - - pathParamsMap := map[string]string{ - "version_loc_id": *accountPublishVersionOptions.VersionLocID, - } - - builder := core.NewRequestBuilder(core.POST) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/versions/{version_loc_id}/account-publish`, pathParamsMap) - if err != nil { - return - } - - for headerName, headerValue := range accountPublishVersionOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "AccountPublishVersion") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - - request, err := builder.Build() - if err != nil { - return - } - - response, err = catalogManagement.Service.Request(request, nil) - - return -} - -// IBMPublishVersion : Publish version to IBMers in public catalog -// Publish the specified version so that it is visible to IBMers in the public catalog. -func (catalogManagement *CatalogManagementV1) IBMPublishVersion(ibmPublishVersionOptions *IBMPublishVersionOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.IBMPublishVersionWithContext(context.Background(), ibmPublishVersionOptions) -} - -// IBMPublishVersionWithContext is an alternate form of the IBMPublishVersion method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) IBMPublishVersionWithContext(ctx context.Context, ibmPublishVersionOptions *IBMPublishVersionOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(ibmPublishVersionOptions, "ibmPublishVersionOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(ibmPublishVersionOptions, "ibmPublishVersionOptions") - if err != nil { - return - } - - pathParamsMap := map[string]string{ - "version_loc_id": *ibmPublishVersionOptions.VersionLocID, - } - - builder := core.NewRequestBuilder(core.POST) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/versions/{version_loc_id}/ibm-publish`, pathParamsMap) - if err != nil { - return - } - - for headerName, headerValue := range ibmPublishVersionOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "IBMPublishVersion") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - - request, err := builder.Build() - if err != nil { - return - } - - response, err = catalogManagement.Service.Request(request, nil) - - return -} - -// PublicPublishVersion : Publish version to all users in public catalog -// Publish the specified version so it is visible to all users in the public catalog. -func (catalogManagement *CatalogManagementV1) PublicPublishVersion(publicPublishVersionOptions *PublicPublishVersionOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.PublicPublishVersionWithContext(context.Background(), publicPublishVersionOptions) -} - -// PublicPublishVersionWithContext is an alternate form of the PublicPublishVersion method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) PublicPublishVersionWithContext(ctx context.Context, publicPublishVersionOptions *PublicPublishVersionOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(publicPublishVersionOptions, "publicPublishVersionOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(publicPublishVersionOptions, "publicPublishVersionOptions") - if err != nil { - return - } - - pathParamsMap := map[string]string{ - "version_loc_id": *publicPublishVersionOptions.VersionLocID, - } - - builder := core.NewRequestBuilder(core.POST) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/versions/{version_loc_id}/public-publish`, pathParamsMap) - if err != nil { - return - } - - for headerName, headerValue := range publicPublishVersionOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "PublicPublishVersion") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - - request, err := builder.Build() - if err != nil { - return - } - - response, err = catalogManagement.Service.Request(request, nil) - - return -} - // GetCluster : Get kubernetes cluster // Get the contents of the specified kubernetes cluster. func (catalogManagement *CatalogManagementV1) GetCluster(getClusterOptions *GetClusterOptions) (result *ClusterInfo, response *core.DetailedResponse, err error) { @@ -5069,15 +4926,9 @@ func (catalogManagement *CatalogManagementV1) CreateObjectWithContext(ctx contex builder.AddHeader("Content-Type", "application/json") body := make(map[string]interface{}) - if createObjectOptions.ID != nil { - body["id"] = createObjectOptions.ID - } if createObjectOptions.Name != nil { body["name"] = createObjectOptions.Name } - if createObjectOptions.Rev != nil { - body["_rev"] = createObjectOptions.Rev - } if createObjectOptions.CRN != nil { body["crn"] = createObjectOptions.CRN } @@ -5258,12 +5109,12 @@ func (catalogManagement *CatalogManagementV1) ReplaceObjectWithContext(ctx conte if replaceObjectOptions.ID != nil { body["id"] = replaceObjectOptions.ID } - if replaceObjectOptions.Name != nil { - body["name"] = replaceObjectOptions.Name - } if replaceObjectOptions.Rev != nil { body["_rev"] = replaceObjectOptions.Rev } + if replaceObjectOptions.Name != nil { + body["name"] = replaceObjectOptions.Name + } if replaceObjectOptions.CRN != nil { body["crn"] = replaceObjectOptions.CRN } @@ -5782,12 +5633,15 @@ func (catalogManagement *CatalogManagementV1) GetObjectAccessWithContext(ctx con // CreateObjectAccess : Add account ID to object access list // Add an account ID to an object's access list. +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) CreateObjectAccess(createObjectAccessOptions *CreateObjectAccessOptions) (response *core.DetailedResponse, err error) { return catalogManagement.CreateObjectAccessWithContext(context.Background(), createObjectAccessOptions) } // CreateObjectAccessWithContext is an alternate form of the CreateObjectAccess method which supports a Context parameter +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) CreateObjectAccessWithContext(ctx context.Context, createObjectAccessOptions *CreateObjectAccessOptions) (response *core.DetailedResponse, err error) { + core.GetLogger().Warn("A deprecated operation has been invoked: CreateObjectAccess") err = core.ValidateNotNil(createObjectAccessOptions, "createObjectAccessOptions cannot be nil") if err != nil { return @@ -5832,12 +5686,15 @@ func (catalogManagement *CatalogManagementV1) CreateObjectAccessWithContext(ctx // DeleteObjectAccess : Remove account ID from object access list // Delete the specified account ID from the specified object's access list. +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) DeleteObjectAccess(deleteObjectAccessOptions *DeleteObjectAccessOptions) (response *core.DetailedResponse, err error) { return catalogManagement.DeleteObjectAccessWithContext(context.Background(), deleteObjectAccessOptions) } // DeleteObjectAccessWithContext is an alternate form of the DeleteObjectAccess method which supports a Context parameter +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) DeleteObjectAccessWithContext(ctx context.Context, deleteObjectAccessOptions *DeleteObjectAccessOptions) (response *core.DetailedResponse, err error) { + core.GetLogger().Warn("A deprecated operation has been invoked: DeleteObjectAccess") err = core.ValidateNotNil(deleteObjectAccessOptions, "deleteObjectAccessOptions cannot be nil") if err != nil { return @@ -5882,12 +5739,15 @@ func (catalogManagement *CatalogManagementV1) DeleteObjectAccessWithContext(ctx // GetObjectAccessListDeprecated : Get object access list // Deprecated - use /accessv1 instead. +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) GetObjectAccessListDeprecated(getObjectAccessListDeprecatedOptions *GetObjectAccessListDeprecatedOptions) (result *ObjectAccessListResult, response *core.DetailedResponse, err error) { return catalogManagement.GetObjectAccessListDeprecatedWithContext(context.Background(), getObjectAccessListDeprecatedOptions) } // GetObjectAccessListDeprecatedWithContext is an alternate form of the GetObjectAccessListDeprecated method which supports a Context parameter +// Deprecated: this method is deprecated and may be removed in a future release. func (catalogManagement *CatalogManagementV1) GetObjectAccessListDeprecatedWithContext(ctx context.Context, getObjectAccessListDeprecatedOptions *GetObjectAccessListDeprecatedOptions) (result *ObjectAccessListResult, response *core.DetailedResponse, err error) { + core.GetLogger().Warn("A deprecated operation has been invoked: GetObjectAccessListDeprecated") err = core.ValidateNotNil(getObjectAccessListDeprecatedOptions, "getObjectAccessListDeprecatedOptions cannot be nil") if err != nil { return @@ -6082,322 +5942,337 @@ func (catalogManagement *CatalogManagementV1) AddObjectAccessListWithContext(ctx return } -// AccountPublishObject : Publish object to account -// Publish a catalog object to account. -func (catalogManagement *CatalogManagementV1) AccountPublishObject(accountPublishObjectOptions *AccountPublishObjectOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.AccountPublishObjectWithContext(context.Background(), accountPublishObjectOptions) +// CreateOfferingInstance : Create an offering resource instance +// Provision a new offering in a given account, and return its resource instance. +func (catalogManagement *CatalogManagementV1) CreateOfferingInstance(createOfferingInstanceOptions *CreateOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { + return catalogManagement.CreateOfferingInstanceWithContext(context.Background(), createOfferingInstanceOptions) } -// AccountPublishObjectWithContext is an alternate form of the AccountPublishObject method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) AccountPublishObjectWithContext(ctx context.Context, accountPublishObjectOptions *AccountPublishObjectOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(accountPublishObjectOptions, "accountPublishObjectOptions cannot be nil") +// CreateOfferingInstanceWithContext is an alternate form of the CreateOfferingInstance method which supports a Context parameter +func (catalogManagement *CatalogManagementV1) CreateOfferingInstanceWithContext(ctx context.Context, createOfferingInstanceOptions *CreateOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(createOfferingInstanceOptions, "createOfferingInstanceOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(accountPublishObjectOptions, "accountPublishObjectOptions") + err = core.ValidateStruct(createOfferingInstanceOptions, "createOfferingInstanceOptions") if err != nil { return } - pathParamsMap := map[string]string{ - "catalog_identifier": *accountPublishObjectOptions.CatalogIdentifier, - "object_identifier": *accountPublishObjectOptions.ObjectIdentifier, - } - builder := core.NewRequestBuilder(core.POST) builder = builder.WithContext(ctx) builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/catalogs/{catalog_identifier}/objects/{object_identifier}/account-publish`, pathParamsMap) + _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/instances/offerings`, nil) if err != nil { return } - for headerName, headerValue := range accountPublishObjectOptions.Headers { + for headerName, headerValue := range createOfferingInstanceOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "AccountPublishObject") + sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "CreateOfferingInstance") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } + builder.AddHeader("Accept", "application/json") + builder.AddHeader("Content-Type", "application/json") + if createOfferingInstanceOptions.XAuthRefreshToken != nil { + builder.AddHeader("X-Auth-Refresh-Token", fmt.Sprint(*createOfferingInstanceOptions.XAuthRefreshToken)) + } + + body := make(map[string]interface{}) + if createOfferingInstanceOptions.ID != nil { + body["id"] = createOfferingInstanceOptions.ID + } + if createOfferingInstanceOptions.Rev != nil { + body["_rev"] = createOfferingInstanceOptions.Rev + } + if createOfferingInstanceOptions.URL != nil { + body["url"] = createOfferingInstanceOptions.URL + } + if createOfferingInstanceOptions.CRN != nil { + body["crn"] = createOfferingInstanceOptions.CRN + } + if createOfferingInstanceOptions.Label != nil { + body["label"] = createOfferingInstanceOptions.Label + } + if createOfferingInstanceOptions.CatalogID != nil { + body["catalog_id"] = createOfferingInstanceOptions.CatalogID + } + if createOfferingInstanceOptions.OfferingID != nil { + body["offering_id"] = createOfferingInstanceOptions.OfferingID + } + if createOfferingInstanceOptions.KindFormat != nil { + body["kind_format"] = createOfferingInstanceOptions.KindFormat + } + if createOfferingInstanceOptions.Version != nil { + body["version"] = createOfferingInstanceOptions.Version + } + if createOfferingInstanceOptions.VersionID != nil { + body["version_id"] = createOfferingInstanceOptions.VersionID + } + if createOfferingInstanceOptions.ClusterID != nil { + body["cluster_id"] = createOfferingInstanceOptions.ClusterID + } + if createOfferingInstanceOptions.ClusterRegion != nil { + body["cluster_region"] = createOfferingInstanceOptions.ClusterRegion + } + if createOfferingInstanceOptions.ClusterNamespaces != nil { + body["cluster_namespaces"] = createOfferingInstanceOptions.ClusterNamespaces + } + if createOfferingInstanceOptions.ClusterAllNamespaces != nil { + body["cluster_all_namespaces"] = createOfferingInstanceOptions.ClusterAllNamespaces + } + if createOfferingInstanceOptions.SchematicsWorkspaceID != nil { + body["schematics_workspace_id"] = createOfferingInstanceOptions.SchematicsWorkspaceID + } + if createOfferingInstanceOptions.InstallPlan != nil { + body["install_plan"] = createOfferingInstanceOptions.InstallPlan + } + if createOfferingInstanceOptions.Channel != nil { + body["channel"] = createOfferingInstanceOptions.Channel + } + if createOfferingInstanceOptions.Created != nil { + body["created"] = createOfferingInstanceOptions.Created + } + if createOfferingInstanceOptions.Updated != nil { + body["updated"] = createOfferingInstanceOptions.Updated + } + if createOfferingInstanceOptions.Metadata != nil { + body["metadata"] = createOfferingInstanceOptions.Metadata + } + if createOfferingInstanceOptions.ResourceGroupID != nil { + body["resource_group_id"] = createOfferingInstanceOptions.ResourceGroupID + } + if createOfferingInstanceOptions.Location != nil { + body["location"] = createOfferingInstanceOptions.Location + } + if createOfferingInstanceOptions.Disabled != nil { + body["disabled"] = createOfferingInstanceOptions.Disabled + } + if createOfferingInstanceOptions.Account != nil { + body["account"] = createOfferingInstanceOptions.Account + } + if createOfferingInstanceOptions.LastOperation != nil { + body["last_operation"] = createOfferingInstanceOptions.LastOperation + } + if createOfferingInstanceOptions.KindTarget != nil { + body["kind_target"] = createOfferingInstanceOptions.KindTarget + } + if createOfferingInstanceOptions.Sha != nil { + body["sha"] = createOfferingInstanceOptions.Sha + } + _, err = builder.SetBodyContentJSON(body) + if err != nil { + return + } request, err := builder.Build() if err != nil { return } - response, err = catalogManagement.Service.Request(request, nil) + var rawResponse map[string]json.RawMessage + response, err = catalogManagement.Service.Request(request, &rawResponse) + if err != nil { + return + } + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOfferingInstance) + if err != nil { + return + } + response.Result = result + } return } -// SharedPublishObject : Publish object to share with allow list -// Publish the specified object so that it is visible to those in the allow list. -func (catalogManagement *CatalogManagementV1) SharedPublishObject(sharedPublishObjectOptions *SharedPublishObjectOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.SharedPublishObjectWithContext(context.Background(), sharedPublishObjectOptions) +// GetOfferingInstance : Get Offering Instance +// Get the resource associated with an installed offering instance. +func (catalogManagement *CatalogManagementV1) GetOfferingInstance(getOfferingInstanceOptions *GetOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { + return catalogManagement.GetOfferingInstanceWithContext(context.Background(), getOfferingInstanceOptions) } -// SharedPublishObjectWithContext is an alternate form of the SharedPublishObject method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) SharedPublishObjectWithContext(ctx context.Context, sharedPublishObjectOptions *SharedPublishObjectOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(sharedPublishObjectOptions, "sharedPublishObjectOptions cannot be nil") +// GetOfferingInstanceWithContext is an alternate form of the GetOfferingInstance method which supports a Context parameter +func (catalogManagement *CatalogManagementV1) GetOfferingInstanceWithContext(ctx context.Context, getOfferingInstanceOptions *GetOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(getOfferingInstanceOptions, "getOfferingInstanceOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(sharedPublishObjectOptions, "sharedPublishObjectOptions") + err = core.ValidateStruct(getOfferingInstanceOptions, "getOfferingInstanceOptions") if err != nil { return } pathParamsMap := map[string]string{ - "catalog_identifier": *sharedPublishObjectOptions.CatalogIdentifier, - "object_identifier": *sharedPublishObjectOptions.ObjectIdentifier, + "instance_identifier": *getOfferingInstanceOptions.InstanceIdentifier, } - builder := core.NewRequestBuilder(core.POST) + builder := core.NewRequestBuilder(core.GET) builder = builder.WithContext(ctx) builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/catalogs/{catalog_identifier}/objects/{object_identifier}/shared-publish`, pathParamsMap) + _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/instances/offerings/{instance_identifier}`, pathParamsMap) if err != nil { return } - for headerName, headerValue := range sharedPublishObjectOptions.Headers { + for headerName, headerValue := range getOfferingInstanceOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "SharedPublishObject") + sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "GetOfferingInstance") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } + builder.AddHeader("Accept", "application/json") request, err := builder.Build() if err != nil { return } - response, err = catalogManagement.Service.Request(request, nil) - - return -} - -// IBMPublishObject : Publish object to share with IBMers -// Publish the specified object so that it is visible to IBMers in the public catalog. -func (catalogManagement *CatalogManagementV1) IBMPublishObject(ibmPublishObjectOptions *IBMPublishObjectOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.IBMPublishObjectWithContext(context.Background(), ibmPublishObjectOptions) -} - -// IBMPublishObjectWithContext is an alternate form of the IBMPublishObject method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) IBMPublishObjectWithContext(ctx context.Context, ibmPublishObjectOptions *IBMPublishObjectOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(ibmPublishObjectOptions, "ibmPublishObjectOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(ibmPublishObjectOptions, "ibmPublishObjectOptions") - if err != nil { - return - } - - pathParamsMap := map[string]string{ - "catalog_identifier": *ibmPublishObjectOptions.CatalogIdentifier, - "object_identifier": *ibmPublishObjectOptions.ObjectIdentifier, - } - - builder := core.NewRequestBuilder(core.POST) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/catalogs/{catalog_identifier}/objects/{object_identifier}/ibm-publish`, pathParamsMap) + var rawResponse map[string]json.RawMessage + response, err = catalogManagement.Service.Request(request, &rawResponse) if err != nil { return } - - for headerName, headerValue := range ibmPublishObjectOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "IBMPublishObject") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - - request, err := builder.Build() - if err != nil { - return + if rawResponse != nil { + err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOfferingInstance) + if err != nil { + return + } + response.Result = result } - response, err = catalogManagement.Service.Request(request, nil) - return } -// PublicPublishObject : Publish object to share with all users -// Publish the specified object so it is visible to all users in the public catalog. -func (catalogManagement *CatalogManagementV1) PublicPublishObject(publicPublishObjectOptions *PublicPublishObjectOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.PublicPublishObjectWithContext(context.Background(), publicPublishObjectOptions) +// PutOfferingInstance : Update Offering Instance +// Update an installed offering instance. +func (catalogManagement *CatalogManagementV1) PutOfferingInstance(putOfferingInstanceOptions *PutOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { + return catalogManagement.PutOfferingInstanceWithContext(context.Background(), putOfferingInstanceOptions) } -// PublicPublishObjectWithContext is an alternate form of the PublicPublishObject method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) PublicPublishObjectWithContext(ctx context.Context, publicPublishObjectOptions *PublicPublishObjectOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(publicPublishObjectOptions, "publicPublishObjectOptions cannot be nil") +// PutOfferingInstanceWithContext is an alternate form of the PutOfferingInstance method which supports a Context parameter +func (catalogManagement *CatalogManagementV1) PutOfferingInstanceWithContext(ctx context.Context, putOfferingInstanceOptions *PutOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(putOfferingInstanceOptions, "putOfferingInstanceOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(publicPublishObjectOptions, "publicPublishObjectOptions") + err = core.ValidateStruct(putOfferingInstanceOptions, "putOfferingInstanceOptions") if err != nil { return } pathParamsMap := map[string]string{ - "catalog_identifier": *publicPublishObjectOptions.CatalogIdentifier, - "object_identifier": *publicPublishObjectOptions.ObjectIdentifier, - } - - builder := core.NewRequestBuilder(core.POST) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/catalogs/{catalog_identifier}/objects/{object_identifier}/public-publish`, pathParamsMap) - if err != nil { - return - } - - for headerName, headerValue := range publicPublishObjectOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "PublicPublishObject") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - - request, err := builder.Build() - if err != nil { - return - } - - response, err = catalogManagement.Service.Request(request, nil) - - return -} - -// CreateOfferingInstance : Create an offering resource instance -// Provision a new offering in a given account, and return its resource instance. -func (catalogManagement *CatalogManagementV1) CreateOfferingInstance(createOfferingInstanceOptions *CreateOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { - return catalogManagement.CreateOfferingInstanceWithContext(context.Background(), createOfferingInstanceOptions) -} - -// CreateOfferingInstanceWithContext is an alternate form of the CreateOfferingInstance method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) CreateOfferingInstanceWithContext(ctx context.Context, createOfferingInstanceOptions *CreateOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(createOfferingInstanceOptions, "createOfferingInstanceOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(createOfferingInstanceOptions, "createOfferingInstanceOptions") - if err != nil { - return + "instance_identifier": *putOfferingInstanceOptions.InstanceIdentifier, } - builder := core.NewRequestBuilder(core.POST) + builder := core.NewRequestBuilder(core.PUT) builder = builder.WithContext(ctx) builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/instances/offerings`, nil) + _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/instances/offerings/{instance_identifier}`, pathParamsMap) if err != nil { return } - for headerName, headerValue := range createOfferingInstanceOptions.Headers { + for headerName, headerValue := range putOfferingInstanceOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "CreateOfferingInstance") + sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "PutOfferingInstance") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } builder.AddHeader("Accept", "application/json") builder.AddHeader("Content-Type", "application/json") - if createOfferingInstanceOptions.XAuthRefreshToken != nil { - builder.AddHeader("X-Auth-Refresh-Token", fmt.Sprint(*createOfferingInstanceOptions.XAuthRefreshToken)) + if putOfferingInstanceOptions.XAuthRefreshToken != nil { + builder.AddHeader("X-Auth-Refresh-Token", fmt.Sprint(*putOfferingInstanceOptions.XAuthRefreshToken)) } body := make(map[string]interface{}) - if createOfferingInstanceOptions.ID != nil { - body["id"] = createOfferingInstanceOptions.ID + if putOfferingInstanceOptions.ID != nil { + body["id"] = putOfferingInstanceOptions.ID } - if createOfferingInstanceOptions.Rev != nil { - body["_rev"] = createOfferingInstanceOptions.Rev + if putOfferingInstanceOptions.Rev != nil { + body["_rev"] = putOfferingInstanceOptions.Rev } - if createOfferingInstanceOptions.URL != nil { - body["url"] = createOfferingInstanceOptions.URL + if putOfferingInstanceOptions.URL != nil { + body["url"] = putOfferingInstanceOptions.URL } - if createOfferingInstanceOptions.CRN != nil { - body["crn"] = createOfferingInstanceOptions.CRN + if putOfferingInstanceOptions.CRN != nil { + body["crn"] = putOfferingInstanceOptions.CRN } - if createOfferingInstanceOptions.Label != nil { - body["label"] = createOfferingInstanceOptions.Label + if putOfferingInstanceOptions.Label != nil { + body["label"] = putOfferingInstanceOptions.Label } - if createOfferingInstanceOptions.CatalogID != nil { - body["catalog_id"] = createOfferingInstanceOptions.CatalogID + if putOfferingInstanceOptions.CatalogID != nil { + body["catalog_id"] = putOfferingInstanceOptions.CatalogID } - if createOfferingInstanceOptions.OfferingID != nil { - body["offering_id"] = createOfferingInstanceOptions.OfferingID + if putOfferingInstanceOptions.OfferingID != nil { + body["offering_id"] = putOfferingInstanceOptions.OfferingID } - if createOfferingInstanceOptions.KindFormat != nil { - body["kind_format"] = createOfferingInstanceOptions.KindFormat + if putOfferingInstanceOptions.KindFormat != nil { + body["kind_format"] = putOfferingInstanceOptions.KindFormat } - if createOfferingInstanceOptions.Version != nil { - body["version"] = createOfferingInstanceOptions.Version + if putOfferingInstanceOptions.Version != nil { + body["version"] = putOfferingInstanceOptions.Version } - if createOfferingInstanceOptions.VersionID != nil { - body["version_id"] = createOfferingInstanceOptions.VersionID + if putOfferingInstanceOptions.VersionID != nil { + body["version_id"] = putOfferingInstanceOptions.VersionID } - if createOfferingInstanceOptions.ClusterID != nil { - body["cluster_id"] = createOfferingInstanceOptions.ClusterID + if putOfferingInstanceOptions.ClusterID != nil { + body["cluster_id"] = putOfferingInstanceOptions.ClusterID } - if createOfferingInstanceOptions.ClusterRegion != nil { - body["cluster_region"] = createOfferingInstanceOptions.ClusterRegion + if putOfferingInstanceOptions.ClusterRegion != nil { + body["cluster_region"] = putOfferingInstanceOptions.ClusterRegion } - if createOfferingInstanceOptions.ClusterNamespaces != nil { - body["cluster_namespaces"] = createOfferingInstanceOptions.ClusterNamespaces + if putOfferingInstanceOptions.ClusterNamespaces != nil { + body["cluster_namespaces"] = putOfferingInstanceOptions.ClusterNamespaces } - if createOfferingInstanceOptions.ClusterAllNamespaces != nil { - body["cluster_all_namespaces"] = createOfferingInstanceOptions.ClusterAllNamespaces + if putOfferingInstanceOptions.ClusterAllNamespaces != nil { + body["cluster_all_namespaces"] = putOfferingInstanceOptions.ClusterAllNamespaces } - if createOfferingInstanceOptions.SchematicsWorkspaceID != nil { - body["schematics_workspace_id"] = createOfferingInstanceOptions.SchematicsWorkspaceID + if putOfferingInstanceOptions.SchematicsWorkspaceID != nil { + body["schematics_workspace_id"] = putOfferingInstanceOptions.SchematicsWorkspaceID } - if createOfferingInstanceOptions.InstallPlan != nil { - body["install_plan"] = createOfferingInstanceOptions.InstallPlan + if putOfferingInstanceOptions.InstallPlan != nil { + body["install_plan"] = putOfferingInstanceOptions.InstallPlan } - if createOfferingInstanceOptions.Channel != nil { - body["channel"] = createOfferingInstanceOptions.Channel + if putOfferingInstanceOptions.Channel != nil { + body["channel"] = putOfferingInstanceOptions.Channel } - if createOfferingInstanceOptions.Created != nil { - body["created"] = createOfferingInstanceOptions.Created + if putOfferingInstanceOptions.Created != nil { + body["created"] = putOfferingInstanceOptions.Created } - if createOfferingInstanceOptions.Updated != nil { - body["updated"] = createOfferingInstanceOptions.Updated + if putOfferingInstanceOptions.Updated != nil { + body["updated"] = putOfferingInstanceOptions.Updated } - if createOfferingInstanceOptions.Metadata != nil { - body["metadata"] = createOfferingInstanceOptions.Metadata + if putOfferingInstanceOptions.Metadata != nil { + body["metadata"] = putOfferingInstanceOptions.Metadata } - if createOfferingInstanceOptions.ResourceGroupID != nil { - body["resource_group_id"] = createOfferingInstanceOptions.ResourceGroupID + if putOfferingInstanceOptions.ResourceGroupID != nil { + body["resource_group_id"] = putOfferingInstanceOptions.ResourceGroupID } - if createOfferingInstanceOptions.Location != nil { - body["location"] = createOfferingInstanceOptions.Location + if putOfferingInstanceOptions.Location != nil { + body["location"] = putOfferingInstanceOptions.Location } - if createOfferingInstanceOptions.Disabled != nil { - body["disabled"] = createOfferingInstanceOptions.Disabled + if putOfferingInstanceOptions.Disabled != nil { + body["disabled"] = putOfferingInstanceOptions.Disabled } - if createOfferingInstanceOptions.Account != nil { - body["account"] = createOfferingInstanceOptions.Account + if putOfferingInstanceOptions.Account != nil { + body["account"] = putOfferingInstanceOptions.Account } - if createOfferingInstanceOptions.LastOperation != nil { - body["last_operation"] = createOfferingInstanceOptions.LastOperation + if putOfferingInstanceOptions.LastOperation != nil { + body["last_operation"] = putOfferingInstanceOptions.LastOperation } - if createOfferingInstanceOptions.KindTarget != nil { - body["kind_target"] = createOfferingInstanceOptions.KindTarget + if putOfferingInstanceOptions.KindTarget != nil { + body["kind_target"] = putOfferingInstanceOptions.KindTarget } - if createOfferingInstanceOptions.Sha != nil { - body["sha"] = createOfferingInstanceOptions.Sha + if putOfferingInstanceOptions.Sha != nil { + body["sha"] = putOfferingInstanceOptions.Sha } _, err = builder.SetBodyContentJSON(body) if err != nil { @@ -6425,28 +6300,28 @@ func (catalogManagement *CatalogManagementV1) CreateOfferingInstanceWithContext( return } -// GetOfferingInstance : Get Offering Instance -// Get the resource associated with an installed offering instance. -func (catalogManagement *CatalogManagementV1) GetOfferingInstance(getOfferingInstanceOptions *GetOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { - return catalogManagement.GetOfferingInstanceWithContext(context.Background(), getOfferingInstanceOptions) +// DeleteOfferingInstance : Delete a version instance +// Delete and instance deployed out of a product version. +func (catalogManagement *CatalogManagementV1) DeleteOfferingInstance(deleteOfferingInstanceOptions *DeleteOfferingInstanceOptions) (response *core.DetailedResponse, err error) { + return catalogManagement.DeleteOfferingInstanceWithContext(context.Background(), deleteOfferingInstanceOptions) } -// GetOfferingInstanceWithContext is an alternate form of the GetOfferingInstance method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) GetOfferingInstanceWithContext(ctx context.Context, getOfferingInstanceOptions *GetOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(getOfferingInstanceOptions, "getOfferingInstanceOptions cannot be nil") +// DeleteOfferingInstanceWithContext is an alternate form of the DeleteOfferingInstance method which supports a Context parameter +func (catalogManagement *CatalogManagementV1) DeleteOfferingInstanceWithContext(ctx context.Context, deleteOfferingInstanceOptions *DeleteOfferingInstanceOptions) (response *core.DetailedResponse, err error) { + err = core.ValidateNotNil(deleteOfferingInstanceOptions, "deleteOfferingInstanceOptions cannot be nil") if err != nil { return } - err = core.ValidateStruct(getOfferingInstanceOptions, "getOfferingInstanceOptions") + err = core.ValidateStruct(deleteOfferingInstanceOptions, "deleteOfferingInstanceOptions") if err != nil { return } pathParamsMap := map[string]string{ - "instance_identifier": *getOfferingInstanceOptions.InstanceIdentifier, + "instance_identifier": *deleteOfferingInstanceOptions.InstanceIdentifier, } - builder := core.NewRequestBuilder(core.GET) + builder := core.NewRequestBuilder(core.DELETE) builder = builder.WithContext(ctx) builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/instances/offerings/{instance_identifier}`, pathParamsMap) @@ -6454,235 +6329,24 @@ func (catalogManagement *CatalogManagementV1) GetOfferingInstanceWithContext(ctx return } - for headerName, headerValue := range getOfferingInstanceOptions.Headers { + for headerName, headerValue := range deleteOfferingInstanceOptions.Headers { builder.AddHeader(headerName, headerValue) } - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "GetOfferingInstance") + sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "DeleteOfferingInstance") for headerName, headerValue := range sdkHeaders { builder.AddHeader(headerName, headerValue) } - builder.AddHeader("Accept", "application/json") + if deleteOfferingInstanceOptions.XAuthRefreshToken != nil { + builder.AddHeader("X-Auth-Refresh-Token", fmt.Sprint(*deleteOfferingInstanceOptions.XAuthRefreshToken)) + } request, err := builder.Build() if err != nil { return } - var rawResponse map[string]json.RawMessage - response, err = catalogManagement.Service.Request(request, &rawResponse) - if err != nil { - return - } - if rawResponse != nil { - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOfferingInstance) - if err != nil { - return - } - response.Result = result - } - - return -} - -// PutOfferingInstance : Update Offering Instance -// Update an installed offering instance. -func (catalogManagement *CatalogManagementV1) PutOfferingInstance(putOfferingInstanceOptions *PutOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { - return catalogManagement.PutOfferingInstanceWithContext(context.Background(), putOfferingInstanceOptions) -} - -// PutOfferingInstanceWithContext is an alternate form of the PutOfferingInstance method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) PutOfferingInstanceWithContext(ctx context.Context, putOfferingInstanceOptions *PutOfferingInstanceOptions) (result *OfferingInstance, response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(putOfferingInstanceOptions, "putOfferingInstanceOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(putOfferingInstanceOptions, "putOfferingInstanceOptions") - if err != nil { - return - } - - pathParamsMap := map[string]string{ - "instance_identifier": *putOfferingInstanceOptions.InstanceIdentifier, - } - - builder := core.NewRequestBuilder(core.PUT) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/instances/offerings/{instance_identifier}`, pathParamsMap) - if err != nil { - return - } - - for headerName, headerValue := range putOfferingInstanceOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "PutOfferingInstance") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - builder.AddHeader("Accept", "application/json") - builder.AddHeader("Content-Type", "application/json") - if putOfferingInstanceOptions.XAuthRefreshToken != nil { - builder.AddHeader("X-Auth-Refresh-Token", fmt.Sprint(*putOfferingInstanceOptions.XAuthRefreshToken)) - } - - body := make(map[string]interface{}) - if putOfferingInstanceOptions.ID != nil { - body["id"] = putOfferingInstanceOptions.ID - } - if putOfferingInstanceOptions.Rev != nil { - body["_rev"] = putOfferingInstanceOptions.Rev - } - if putOfferingInstanceOptions.URL != nil { - body["url"] = putOfferingInstanceOptions.URL - } - if putOfferingInstanceOptions.CRN != nil { - body["crn"] = putOfferingInstanceOptions.CRN - } - if putOfferingInstanceOptions.Label != nil { - body["label"] = putOfferingInstanceOptions.Label - } - if putOfferingInstanceOptions.CatalogID != nil { - body["catalog_id"] = putOfferingInstanceOptions.CatalogID - } - if putOfferingInstanceOptions.OfferingID != nil { - body["offering_id"] = putOfferingInstanceOptions.OfferingID - } - if putOfferingInstanceOptions.KindFormat != nil { - body["kind_format"] = putOfferingInstanceOptions.KindFormat - } - if putOfferingInstanceOptions.Version != nil { - body["version"] = putOfferingInstanceOptions.Version - } - if putOfferingInstanceOptions.VersionID != nil { - body["version_id"] = putOfferingInstanceOptions.VersionID - } - if putOfferingInstanceOptions.ClusterID != nil { - body["cluster_id"] = putOfferingInstanceOptions.ClusterID - } - if putOfferingInstanceOptions.ClusterRegion != nil { - body["cluster_region"] = putOfferingInstanceOptions.ClusterRegion - } - if putOfferingInstanceOptions.ClusterNamespaces != nil { - body["cluster_namespaces"] = putOfferingInstanceOptions.ClusterNamespaces - } - if putOfferingInstanceOptions.ClusterAllNamespaces != nil { - body["cluster_all_namespaces"] = putOfferingInstanceOptions.ClusterAllNamespaces - } - if putOfferingInstanceOptions.SchematicsWorkspaceID != nil { - body["schematics_workspace_id"] = putOfferingInstanceOptions.SchematicsWorkspaceID - } - if putOfferingInstanceOptions.InstallPlan != nil { - body["install_plan"] = putOfferingInstanceOptions.InstallPlan - } - if putOfferingInstanceOptions.Channel != nil { - body["channel"] = putOfferingInstanceOptions.Channel - } - if putOfferingInstanceOptions.Created != nil { - body["created"] = putOfferingInstanceOptions.Created - } - if putOfferingInstanceOptions.Updated != nil { - body["updated"] = putOfferingInstanceOptions.Updated - } - if putOfferingInstanceOptions.Metadata != nil { - body["metadata"] = putOfferingInstanceOptions.Metadata - } - if putOfferingInstanceOptions.ResourceGroupID != nil { - body["resource_group_id"] = putOfferingInstanceOptions.ResourceGroupID - } - if putOfferingInstanceOptions.Location != nil { - body["location"] = putOfferingInstanceOptions.Location - } - if putOfferingInstanceOptions.Disabled != nil { - body["disabled"] = putOfferingInstanceOptions.Disabled - } - if putOfferingInstanceOptions.Account != nil { - body["account"] = putOfferingInstanceOptions.Account - } - if putOfferingInstanceOptions.LastOperation != nil { - body["last_operation"] = putOfferingInstanceOptions.LastOperation - } - if putOfferingInstanceOptions.KindTarget != nil { - body["kind_target"] = putOfferingInstanceOptions.KindTarget - } - if putOfferingInstanceOptions.Sha != nil { - body["sha"] = putOfferingInstanceOptions.Sha - } - _, err = builder.SetBodyContentJSON(body) - if err != nil { - return - } - - request, err := builder.Build() - if err != nil { - return - } - - var rawResponse map[string]json.RawMessage - response, err = catalogManagement.Service.Request(request, &rawResponse) - if err != nil { - return - } - if rawResponse != nil { - err = core.UnmarshalModel(rawResponse, "", &result, UnmarshalOfferingInstance) - if err != nil { - return - } - response.Result = result - } - - return -} - -// DeleteOfferingInstance : Delete a version instance -// Delete and instance deployed out of a product version. -func (catalogManagement *CatalogManagementV1) DeleteOfferingInstance(deleteOfferingInstanceOptions *DeleteOfferingInstanceOptions) (response *core.DetailedResponse, err error) { - return catalogManagement.DeleteOfferingInstanceWithContext(context.Background(), deleteOfferingInstanceOptions) -} - -// DeleteOfferingInstanceWithContext is an alternate form of the DeleteOfferingInstance method which supports a Context parameter -func (catalogManagement *CatalogManagementV1) DeleteOfferingInstanceWithContext(ctx context.Context, deleteOfferingInstanceOptions *DeleteOfferingInstanceOptions) (response *core.DetailedResponse, err error) { - err = core.ValidateNotNil(deleteOfferingInstanceOptions, "deleteOfferingInstanceOptions cannot be nil") - if err != nil { - return - } - err = core.ValidateStruct(deleteOfferingInstanceOptions, "deleteOfferingInstanceOptions") - if err != nil { - return - } - - pathParamsMap := map[string]string{ - "instance_identifier": *deleteOfferingInstanceOptions.InstanceIdentifier, - } - - builder := core.NewRequestBuilder(core.DELETE) - builder = builder.WithContext(ctx) - builder.EnableGzipCompression = catalogManagement.GetEnableGzipCompression() - _, err = builder.ResolveRequestURL(catalogManagement.Service.Options.URL, `/instances/offerings/{instance_identifier}`, pathParamsMap) - if err != nil { - return - } - - for headerName, headerValue := range deleteOfferingInstanceOptions.Headers { - builder.AddHeader(headerName, headerValue) - } - - sdkHeaders := common.GetSdkHeaders("catalog_management", "V1", "DeleteOfferingInstance") - for headerName, headerValue := range sdkHeaders { - builder.AddHeader(headerName, headerValue) - } - if deleteOfferingInstanceOptions.XAuthRefreshToken != nil { - builder.AddHeader("X-Auth-Refresh-Token", fmt.Sprint(*deleteOfferingInstanceOptions.XAuthRefreshToken)) - } - - request, err := builder.Build() - if err != nil { - return - } - - response, err = catalogManagement.Service.Request(request, nil) + response, err = catalogManagement.Service.Request(request, nil) return } @@ -7031,72 +6695,6 @@ func UnmarshalAccount(m map[string]json.RawMessage, result interface{}) (err err return } -// AccountPublishObjectOptions : The AccountPublishObject options. -type AccountPublishObjectOptions struct { - // Catalog identifier. - CatalogIdentifier *string `json:"catalog_identifier" validate:"required,ne="` - - // Object identifier. - ObjectIdentifier *string `json:"object_identifier" validate:"required,ne="` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewAccountPublishObjectOptions : Instantiate AccountPublishObjectOptions -func (*CatalogManagementV1) NewAccountPublishObjectOptions(catalogIdentifier string, objectIdentifier string) *AccountPublishObjectOptions { - return &AccountPublishObjectOptions{ - CatalogIdentifier: core.StringPtr(catalogIdentifier), - ObjectIdentifier: core.StringPtr(objectIdentifier), - } -} - -// SetCatalogIdentifier : Allow user to set CatalogIdentifier -func (_options *AccountPublishObjectOptions) SetCatalogIdentifier(catalogIdentifier string) *AccountPublishObjectOptions { - _options.CatalogIdentifier = core.StringPtr(catalogIdentifier) - return _options -} - -// SetObjectIdentifier : Allow user to set ObjectIdentifier -func (_options *AccountPublishObjectOptions) SetObjectIdentifier(objectIdentifier string) *AccountPublishObjectOptions { - _options.ObjectIdentifier = core.StringPtr(objectIdentifier) - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *AccountPublishObjectOptions) SetHeaders(param map[string]string) *AccountPublishObjectOptions { - options.Headers = param - return options -} - -// AccountPublishVersionOptions : The AccountPublishVersion options. -type AccountPublishVersionOptions struct { - // A dotted value of `catalogID`.`versionID`. - VersionLocID *string `json:"version_loc_id" validate:"required,ne="` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewAccountPublishVersionOptions : Instantiate AccountPublishVersionOptions -func (*CatalogManagementV1) NewAccountPublishVersionOptions(versionLocID string) *AccountPublishVersionOptions { - return &AccountPublishVersionOptions{ - VersionLocID: core.StringPtr(versionLocID), - } -} - -// SetVersionLocID : Allow user to set VersionLocID -func (_options *AccountPublishVersionOptions) SetVersionLocID(versionLocID string) *AccountPublishVersionOptions { - _options.VersionLocID = core.StringPtr(versionLocID) - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *AccountPublishVersionOptions) SetHeaders(param map[string]string) *AccountPublishVersionOptions { - options.Headers = param - return options -} - // AccumulatedFilters : The accumulated filters for an account. This will return the account filters plus a filter for each catalog the user // has access to. type AccumulatedFilters struct { @@ -7276,12 +6874,15 @@ func (options *AddOfferingAccessListOptions) SetHeaders(param map[string]string) // ApprovalResult : Result of approval. type ApprovalResult struct { // Shared - object is shared using access list - not set when using PC Managed objects. + // Deprecated: this field is deprecated and may be removed in a future release. Shared *bool `json:"shared,omitempty"` // Shared with IBM only - access list is also applicable - not set when using PC Managed objects. + // Deprecated: this field is deprecated and may be removed in a future release. IBM *bool `json:"ibm,omitempty"` // Shared with everyone - not set when using PC Managed objects. + // Deprecated: this field is deprecated and may be removed in a future release. Public *bool `json:"public,omitempty"` // Published to Partner Center (pc_managed) or for objects, allowed to request publishing. @@ -7772,6 +7373,9 @@ type Catalog struct { // URL for an icon associated with this catalog. CatalogIconURL *string `json:"catalog_icon_url,omitempty"` + // URL for a banner image for this catalog. + CatalogBannerURL *string `json:"catalog_banner_url,omitempty"` + // List of tags associated with this catalog. Tags []string `json:"tags,omitempty"` @@ -7846,6 +7450,10 @@ func UnmarshalCatalog(m map[string]json.RawMessage, result interface{}) (err err if err != nil { return } + err = core.UnmarshalPrimitive(m, "catalog_banner_url", &obj.CatalogBannerURL) + if err != nil { + return + } err = core.UnmarshalPrimitive(m, "tags", &obj.Tags) if err != nil { return @@ -7911,12 +7519,12 @@ type CatalogObject struct { // unique id. ID *string `json:"id,omitempty"` - // The programmatic name of this object. - Name *string `json:"name,omitempty"` - // Cloudant revision. Rev *string `json:"_rev,omitempty"` + // The programmatic name of this object. + Name *string `json:"name,omitempty"` + // The crn for this specific object. CRN *string `json:"crn,omitempty"` @@ -7973,11 +7581,11 @@ func UnmarshalCatalogObject(m map[string]json.RawMessage, result interface{}) (e if err != nil { return } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) + err = core.UnmarshalPrimitive(m, "_rev", &obj.Rev) if err != nil { return } - err = core.UnmarshalPrimitive(m, "_rev", &obj.Rev) + err = core.UnmarshalPrimitive(m, "name", &obj.Name) if err != nil { return } @@ -8191,6 +7799,123 @@ func (options *CommitVersionOptions) SetHeaders(param map[string]string) *Commit return options } +// ComplianceControl : Control that can be added to a version. +type ComplianceControl struct { + // SCC profile. + SccProfile *ComplianceControlSccProfile `json:"scc_profile,omitempty"` + + // Control family. + Family *ComplianceControlFamily `json:"family,omitempty"` + + // Control goals. + Goals []Goal `json:"goals,omitempty"` + + // Control validation. + Validation *ComplianceControlValidation `json:"validation,omitempty"` +} + +// UnmarshalComplianceControl unmarshals an instance of ComplianceControl from the specified map of raw messages. +func UnmarshalComplianceControl(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ComplianceControl) + err = core.UnmarshalModel(m, "scc_profile", &obj.SccProfile, UnmarshalComplianceControlSccProfile) + if err != nil { + return + } + err = core.UnmarshalModel(m, "family", &obj.Family, UnmarshalComplianceControlFamily) + if err != nil { + return + } + err = core.UnmarshalModel(m, "goals", &obj.Goals, UnmarshalGoal) + if err != nil { + return + } + err = core.UnmarshalModel(m, "validation", &obj.Validation, UnmarshalComplianceControlValidation) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ComplianceControlFamily : Control family. +type ComplianceControlFamily struct { + // ID. + ID *string `json:"id,omitempty"` + + // External ID. + ExternalID *string `json:"external_id,omitempty"` + + // Description. + Description *string `json:"description,omitempty"` + + // UI href. + UIHref *string `json:"ui_href,omitempty"` +} + +// UnmarshalComplianceControlFamily unmarshals an instance of ComplianceControlFamily from the specified map of raw messages. +func UnmarshalComplianceControlFamily(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ComplianceControlFamily) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "external_id", &obj.ExternalID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "ui_href", &obj.UIHref) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ComplianceControlSccProfile : SCC profile. +type ComplianceControlSccProfile struct { + // Profile type. + Type *string `json:"type,omitempty"` +} + +// UnmarshalComplianceControlSccProfile unmarshals an instance of ComplianceControlSccProfile from the specified map of raw messages. +func UnmarshalComplianceControlSccProfile(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ComplianceControlSccProfile) + err = core.UnmarshalPrimitive(m, "type", &obj.Type) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// ComplianceControlValidation : Control validation. +type ComplianceControlValidation struct { + // Validation certified bool. + Certified *bool `json:"certified,omitempty"` + + // Map of validation results. + Results map[string]interface{} `json:"results,omitempty"` +} + +// UnmarshalComplianceControlValidation unmarshals an instance of ComplianceControlValidation from the specified map of raw messages. +func UnmarshalComplianceControlValidation(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(ComplianceControlValidation) + err = core.UnmarshalPrimitive(m, "certified", &obj.Certified) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "results", &obj.Results) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // Configuration : Configuration description. type Configuration struct { // Configuration key. @@ -8505,7 +8230,7 @@ type CostBreakdown struct { TotalHourlyCost *string `json:"totalHourlyCost,omitempty"` // Total monthly cost. - TotalMonthlyCOst *string `json:"totalMonthlyCOst,omitempty"` + TotalMonthlyCost *string `json:"totalMonthlyCost,omitempty"` // Resources. Resources []CostResource `json:"resources,omitempty"` @@ -8518,7 +8243,7 @@ func UnmarshalCostBreakdown(m map[string]json.RawMessage, result interface{}) (e if err != nil { return } - err = core.UnmarshalPrimitive(m, "totalMonthlyCOst", &obj.TotalMonthlyCOst) + err = core.UnmarshalPrimitive(m, "totalMonthlyCost", &obj.TotalMonthlyCost) if err != nil { return } @@ -8782,12 +8507,6 @@ func UnmarshalCostSummary(m map[string]json.RawMessage, result interface{}) (err // CreateCatalogOptions : The CreateCatalog options. type CreateCatalogOptions struct { - // Unique ID. - ID *string `json:"id,omitempty"` - - // Cloudant revision. - Rev *string `json:"_rev,omitempty"` - // Display Name in the requested language. Label *string `json:"label,omitempty"` @@ -8803,6 +8522,9 @@ type CreateCatalogOptions struct { // URL for an icon associated with this catalog. CatalogIconURL *string `json:"catalog_icon_url,omitempty"` + // URL for a banner image for this catalog. + CatalogBannerURL *string `json:"catalog_banner_url,omitempty"` + // List of tags associated with this catalog. Tags []string `json:"tags,omitempty"` @@ -8839,18 +8561,6 @@ func (*CatalogManagementV1) NewCreateCatalogOptions() *CreateCatalogOptions { return &CreateCatalogOptions{} } -// SetID : Allow user to set ID -func (_options *CreateCatalogOptions) SetID(id string) *CreateCatalogOptions { - _options.ID = core.StringPtr(id) - return _options -} - -// SetRev : Allow user to set Rev -func (_options *CreateCatalogOptions) SetRev(rev string) *CreateCatalogOptions { - _options.Rev = core.StringPtr(rev) - return _options -} - // SetLabel : Allow user to set Label func (_options *CreateCatalogOptions) SetLabel(label string) *CreateCatalogOptions { _options.Label = core.StringPtr(label) @@ -8881,6 +8591,12 @@ func (_options *CreateCatalogOptions) SetCatalogIconURL(catalogIconURL string) * return _options } +// SetCatalogBannerURL : Allow user to set CatalogBannerURL +func (_options *CreateCatalogOptions) SetCatalogBannerURL(catalogBannerURL string) *CreateCatalogOptions { + _options.CatalogBannerURL = core.StringPtr(catalogBannerURL) + return _options +} + // SetTags : Allow user to set Tags func (_options *CreateCatalogOptions) SetTags(tags []string) *CreateCatalogOptions { _options.Tags = tags @@ -8995,15 +8711,9 @@ type CreateObjectOptions struct { // Catalog identifier. CatalogIdentifier *string `json:"catalog_identifier" validate:"required,ne="` - // unique id. - ID *string `json:"id,omitempty"` - // The programmatic name of this object. Name *string `json:"name,omitempty"` - // Cloudant revision. - Rev *string `json:"_rev,omitempty"` - // The crn for this specific object. CRN *string `json:"crn,omitempty"` @@ -9069,24 +8779,12 @@ func (_options *CreateObjectOptions) SetCatalogIdentifier(catalogIdentifier stri return _options } -// SetID : Allow user to set ID -func (_options *CreateObjectOptions) SetID(id string) *CreateObjectOptions { - _options.ID = core.StringPtr(id) - return _options -} - // SetName : Allow user to set Name func (_options *CreateObjectOptions) SetName(name string) *CreateObjectOptions { _options.Name = core.StringPtr(name) return _options } -// SetRev : Allow user to set Rev -func (_options *CreateObjectOptions) SetRev(rev string) *CreateObjectOptions { - _options.Rev = core.StringPtr(rev) - return _options -} - // SetCRN : Allow user to set CRN func (_options *CreateObjectOptions) SetCRN(crn string) *CreateObjectOptions { _options.CRN = core.StringPtr(crn) @@ -9466,12 +9164,6 @@ type CreateOfferingOptions struct { // Catalog identifier. CatalogIdentifier *string `json:"catalog_identifier" validate:"required,ne="` - // unique id. - ID *string `json:"id,omitempty"` - - // Cloudant revision. - Rev *string `json:"_rev,omitempty"` - // The url for this specific offering. URL *string `json:"url,omitempty"` @@ -9546,12 +9238,15 @@ type CreateOfferingOptions struct { ShareEnabled *bool `json:"share_enabled,omitempty"` // Is it permitted to request publishing to IBM or Public. + // Deprecated: this field is deprecated and may be removed in a future release. PermitRequestIBMPublicPublish *bool `json:"permit_request_ibm_public_publish,omitempty"` // Indicates if this offering has been approved for use by all IBMers. + // Deprecated: this field is deprecated and may be removed in a future release. IBMPublishApproved *bool `json:"ibm_publish_approved,omitempty"` // Indicates if this offering has been approved for use by all IBM Cloud users. + // Deprecated: this field is deprecated and may be removed in a future release. PublicPublishApproved *bool `json:"public_publish_approved,omitempty"` // The original offering CRN that this publish entry came from. @@ -9582,6 +9277,7 @@ type CreateOfferingOptions struct { Hidden *bool `json:"hidden,omitempty"` // Deprecated - Provider of this offering. + // Deprecated: this field is deprecated and may be removed in a future release. Provider *string `json:"provider,omitempty"` // Information on the provider for this offering, or omitted if no provider information is given. @@ -9625,18 +9321,6 @@ func (_options *CreateOfferingOptions) SetCatalogIdentifier(catalogIdentifier st return _options } -// SetID : Allow user to set ID -func (_options *CreateOfferingOptions) SetID(id string) *CreateOfferingOptions { - _options.ID = core.StringPtr(id) - return _options -} - -// SetRev : Allow user to set Rev -func (_options *CreateOfferingOptions) SetRev(rev string) *CreateOfferingOptions { - _options.Rev = core.StringPtr(rev) - return _options -} - // SetURL : Allow user to set URL func (_options *CreateOfferingOptions) SetURL(url string) *CreateOfferingOptions { _options.URL = core.StringPtr(url) @@ -9782,18 +9466,21 @@ func (_options *CreateOfferingOptions) SetShareEnabled(shareEnabled bool) *Creat } // SetPermitRequestIBMPublicPublish : Allow user to set PermitRequestIBMPublicPublish +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *CreateOfferingOptions) SetPermitRequestIBMPublicPublish(permitRequestIBMPublicPublish bool) *CreateOfferingOptions { _options.PermitRequestIBMPublicPublish = core.BoolPtr(permitRequestIBMPublicPublish) return _options } // SetIBMPublishApproved : Allow user to set IBMPublishApproved +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *CreateOfferingOptions) SetIBMPublishApproved(ibmPublishApproved bool) *CreateOfferingOptions { _options.IBMPublishApproved = core.BoolPtr(ibmPublishApproved) return _options } // SetPublicPublishApproved : Allow user to set PublicPublishApproved +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *CreateOfferingOptions) SetPublicPublishApproved(publicPublishApproved bool) *CreateOfferingOptions { _options.PublicPublishApproved = core.BoolPtr(publicPublishApproved) return _options @@ -9854,6 +9541,7 @@ func (_options *CreateOfferingOptions) SetHidden(hidden bool) *CreateOfferingOpt } // SetProvider : Allow user to set Provider +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *CreateOfferingOptions) SetProvider(provider string) *CreateOfferingOptions { _options.Provider = core.StringPtr(provider) return _options @@ -10286,51 +9974,6 @@ func (options *DeleteVersionOptions) SetHeaders(param map[string]string) *Delete return options } -// Dependency : Dependency definition. -type Dependency struct { - // Optional - If not specified, assumes the Public Catalog. - CatalogID *string `json:"catalog_id,omitempty"` - - // Optional - Offering ID - not required if name is set. - ID *string `json:"id,omitempty"` - - // Optional - Programmatic Offering name. - Name *string `json:"name,omitempty"` - - // Required - Semver value or range. - Version *string `json:"version,omitempty"` - - // Optional - List of dependent flavors in the specified range. - Flavors []string `json:"flavors,omitempty"` -} - -// UnmarshalDependency unmarshals an instance of Dependency from the specified map of raw messages. -func UnmarshalDependency(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(Dependency) - err = core.UnmarshalPrimitive(m, "catalog_id", &obj.CatalogID) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "id", &obj.ID) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "name", &obj.Name) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "version", &obj.Version) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "flavors", &obj.Flavors) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // DeployOperatorsOptions : The DeployOperators options. type DeployOperatorsOptions struct { // IAM Refresh token. @@ -12040,6 +11683,10 @@ type GetOfferingSourceOptions struct { // The channel value of the specified version. Channel *string `json:"channel,omitempty"` + // If false (the default), the root folder from the original onboarded tgz file is removed. If true, the root folder + // is returned. + AsIs *bool `json:"asIs,omitempty"` + // Allows users to set headers on API requests Headers map[string]string } @@ -12093,6 +11740,12 @@ func (_options *GetOfferingSourceOptions) SetChannel(channel string) *GetOfferin return _options } +// SetAsIs : Allow user to set AsIs +func (_options *GetOfferingSourceOptions) SetAsIs(asIs bool) *GetOfferingSourceOptions { + _options.AsIs = core.BoolPtr(asIs) + return _options +} + // SetHeaders : Allow user to set Headers func (options *GetOfferingSourceOptions) SetHeaders(param map[string]string) *GetOfferingSourceOptions { options.Headers = param @@ -12498,6 +12151,37 @@ func (options *GetVersionOptions) SetHeaders(param map[string]string) *GetVersio return options } +// Goal : Compliance control goal. +type Goal struct { + // Goal ID. + ID *string `json:"id,omitempty"` + + // Goal description. + Description *string `json:"description,omitempty"` + + // Goal UI href. + UIHref *string `json:"ui_href,omitempty"` +} + +// UnmarshalGoal unmarshals an instance of Goal from the specified map of raw messages. +func UnmarshalGoal(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(Goal) + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "description", &obj.Description) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "ui_href", &obj.UIHref) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // IamPermission : IAM Permission definition. type IamPermission struct { // Service name. @@ -12584,72 +12268,6 @@ func UnmarshalIDFilter(m map[string]json.RawMessage, result interface{}) (err er return } -// IBMPublishObjectOptions : The IBMPublishObject options. -type IBMPublishObjectOptions struct { - // Catalog identifier. - CatalogIdentifier *string `json:"catalog_identifier" validate:"required,ne="` - - // Object identifier. - ObjectIdentifier *string `json:"object_identifier" validate:"required,ne="` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewIBMPublishObjectOptions : Instantiate IBMPublishObjectOptions -func (*CatalogManagementV1) NewIBMPublishObjectOptions(catalogIdentifier string, objectIdentifier string) *IBMPublishObjectOptions { - return &IBMPublishObjectOptions{ - CatalogIdentifier: core.StringPtr(catalogIdentifier), - ObjectIdentifier: core.StringPtr(objectIdentifier), - } -} - -// SetCatalogIdentifier : Allow user to set CatalogIdentifier -func (_options *IBMPublishObjectOptions) SetCatalogIdentifier(catalogIdentifier string) *IBMPublishObjectOptions { - _options.CatalogIdentifier = core.StringPtr(catalogIdentifier) - return _options -} - -// SetObjectIdentifier : Allow user to set ObjectIdentifier -func (_options *IBMPublishObjectOptions) SetObjectIdentifier(objectIdentifier string) *IBMPublishObjectOptions { - _options.ObjectIdentifier = core.StringPtr(objectIdentifier) - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *IBMPublishObjectOptions) SetHeaders(param map[string]string) *IBMPublishObjectOptions { - options.Headers = param - return options -} - -// IBMPublishVersionOptions : The IBMPublishVersion options. -type IBMPublishVersionOptions struct { - // A dotted value of `catalogID`.`versionID`. - VersionLocID *string `json:"version_loc_id" validate:"required,ne="` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewIBMPublishVersionOptions : Instantiate IBMPublishVersionOptions -func (*CatalogManagementV1) NewIBMPublishVersionOptions(versionLocID string) *IBMPublishVersionOptions { - return &IBMPublishVersionOptions{ - VersionLocID: core.StringPtr(versionLocID), - } -} - -// SetVersionLocID : Allow user to set VersionLocID -func (_options *IBMPublishVersionOptions) SetVersionLocID(versionLocID string) *IBMPublishVersionOptions { - _options.VersionLocID = core.StringPtr(versionLocID) - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *IBMPublishVersionOptions) SetHeaders(param map[string]string) *IBMPublishVersionOptions { - options.Headers = param - return options -} - // Image : Image. type Image struct { // Image. @@ -14529,14 +14147,31 @@ func UnmarshalNamespaceSearchResult(m map[string]json.RawMessage, result interfa return } -// ObjectAccessListResult : Paginated object search result. -type ObjectAccessListResult struct { - // The offset (origin 0) of the first resource in this page of search results. - Offset *int64 `json:"offset" validate:"required"` - - // The maximum number of resources returned in each page of search results. - Limit *int64 `json:"limit" validate:"required"` - +// Retrieve the value to be passed to a request to access the next page of results +func (resp *NamespaceSearchResult) GetNextOffset() (*int64, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + offset, err := core.GetQueryParam(resp.Next, "offset") + if err != nil || offset == nil { + return nil, err + } + var offsetValue int64 + offsetValue, err = strconv.ParseInt(*offset, 10, 64) + if err != nil { + return nil, err + } + return core.Int64Ptr(offsetValue), nil +} + +// ObjectAccessListResult : Paginated object search result. +type ObjectAccessListResult struct { + // The offset (origin 0) of the first resource in this page of search results. + Offset *int64 `json:"offset" validate:"required"` + + // The maximum number of resources returned in each page of search results. + Limit *int64 `json:"limit" validate:"required"` + // The overall total number of resources in the search result set. TotalCount *int64 `json:"total_count,omitempty"` @@ -14602,6 +14237,23 @@ func UnmarshalObjectAccessListResult(m map[string]json.RawMessage, result interf return } +// Retrieve the value to be passed to a request to access the next page of results +func (resp *ObjectAccessListResult) GetNextOffset() (*int64, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + offset, err := core.GetQueryParam(resp.Next, "offset") + if err != nil || offset == nil { + return nil, err + } + var offsetValue int64 + offsetValue, err = strconv.ParseInt(*offset, 10, 64) + if err != nil { + return nil, err + } + return core.Int64Ptr(offsetValue), nil +} + // ObjectListResult : Paginated object search result. type ObjectListResult struct { // The offset (origin 0) of the first resource in this page of search results. @@ -14675,6 +14327,23 @@ func UnmarshalObjectListResult(m map[string]json.RawMessage, result interface{}) return } +// Retrieve the value to be passed to a request to access the next page of results +func (resp *ObjectListResult) GetNextOffset() (*int64, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + offset, err := core.GetQueryParam(resp.Next, "offset") + if err != nil || offset == nil { + return nil, err + } + var offsetValue int64 + offsetValue, err = strconv.ParseInt(*offset, 10, 64) + if err != nil { + return nil, err + } + return core.Int64Ptr(offsetValue), nil +} + // ObjectSearchResult : Paginated object search result. type ObjectSearchResult struct { // The offset (origin 0) of the first resource in this page of search results. @@ -14748,6 +14417,23 @@ func UnmarshalObjectSearchResult(m map[string]json.RawMessage, result interface{ return } +// Retrieve the value to be passed to a request to access the next page of results +func (resp *ObjectSearchResult) GetNextOffset() (*int64, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + offset, err := core.GetQueryParam(resp.Next, "offset") + if err != nil || offset == nil { + return nil, err + } + var offsetValue int64 + offsetValue, err = strconv.ParseInt(*offset, 10, 64) + if err != nil { + return nil, err + } + return core.Int64Ptr(offsetValue), nil +} + // Offering : Offering information. type Offering struct { // unique id. @@ -14830,12 +14516,15 @@ type Offering struct { ShareEnabled *bool `json:"share_enabled,omitempty"` // Is it permitted to request publishing to IBM or Public. + // Deprecated: this field is deprecated and may be removed in a future release. PermitRequestIBMPublicPublish *bool `json:"permit_request_ibm_public_publish,omitempty"` // Indicates if this offering has been approved for use by all IBMers. + // Deprecated: this field is deprecated and may be removed in a future release. IBMPublishApproved *bool `json:"ibm_publish_approved,omitempty"` // Indicates if this offering has been approved for use by all IBM Cloud users. + // Deprecated: this field is deprecated and may be removed in a future release. PublicPublishApproved *bool `json:"public_publish_approved,omitempty"` // The original offering CRN that this publish entry came from. @@ -14866,6 +14555,7 @@ type Offering struct { Hidden *bool `json:"hidden,omitempty"` // Deprecated - Provider of this offering. + // Deprecated: this field is deprecated and may be removed in a future release. Provider *string `json:"provider,omitempty"` // Information on the provider for this offering, or omitted if no provider information is given. @@ -15340,6 +15030,58 @@ func UnmarshalOfferingInstanceLastOperation(m map[string]json.RawMessage, result return } +// OfferingReference : Offering reference definition. +type OfferingReference struct { + // Optional - If not specified, assumes the Public Catalog. + CatalogID *string `json:"catalog_id,omitempty"` + + // Optional - Offering ID - not required if name is set. + ID *string `json:"id,omitempty"` + + // Optional - Programmatic Offering name. + Name *string `json:"name,omitempty"` + + // Format kind. + Kind *string `json:"kind,omitempty"` + + // Required - Semver value or range. + Version *string `json:"version,omitempty"` + + // Optional - List of dependent flavors in the specified range. + Flavors []string `json:"flavors,omitempty"` +} + +// UnmarshalOfferingReference unmarshals an instance of OfferingReference from the specified map of raw messages. +func UnmarshalOfferingReference(m map[string]json.RawMessage, result interface{}) (err error) { + obj := new(OfferingReference) + err = core.UnmarshalPrimitive(m, "catalog_id", &obj.CatalogID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "id", &obj.ID) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "name", &obj.Name) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "kind", &obj.Kind) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "version", &obj.Version) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "flavors", &obj.Flavors) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + // OfferingSearchResult : Paginated offering search result. type OfferingSearchResult struct { // The offset (origin 0) of the first resource in this page of search results. @@ -15413,6 +15155,23 @@ func UnmarshalOfferingSearchResult(m map[string]json.RawMessage, result interfac return } +// Retrieve the value to be passed to a request to access the next page of results +func (resp *OfferingSearchResult) GetNextOffset() (*int64, error) { + if core.IsNil(resp.Next) { + return nil, nil + } + offset, err := core.GetQueryParam(resp.Next, "offset") + if err != nil || offset == nil { + return nil, err + } + var offsetValue int64 + offsetValue, err = strconv.ParseInt(*offset, 10, 64) + if err != nil { + return nil, err + } + return core.Int64Ptr(offsetValue), nil +} + // OperatorDeployResult : Operator deploy result. type OperatorDeployResult struct { // Status phase. @@ -15863,72 +15622,6 @@ func UnmarshalProviderInfo(m map[string]json.RawMessage, result interface{}) (er return } -// PublicPublishObjectOptions : The PublicPublishObject options. -type PublicPublishObjectOptions struct { - // Catalog identifier. - CatalogIdentifier *string `json:"catalog_identifier" validate:"required,ne="` - - // Object identifier. - ObjectIdentifier *string `json:"object_identifier" validate:"required,ne="` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewPublicPublishObjectOptions : Instantiate PublicPublishObjectOptions -func (*CatalogManagementV1) NewPublicPublishObjectOptions(catalogIdentifier string, objectIdentifier string) *PublicPublishObjectOptions { - return &PublicPublishObjectOptions{ - CatalogIdentifier: core.StringPtr(catalogIdentifier), - ObjectIdentifier: core.StringPtr(objectIdentifier), - } -} - -// SetCatalogIdentifier : Allow user to set CatalogIdentifier -func (_options *PublicPublishObjectOptions) SetCatalogIdentifier(catalogIdentifier string) *PublicPublishObjectOptions { - _options.CatalogIdentifier = core.StringPtr(catalogIdentifier) - return _options -} - -// SetObjectIdentifier : Allow user to set ObjectIdentifier -func (_options *PublicPublishObjectOptions) SetObjectIdentifier(objectIdentifier string) *PublicPublishObjectOptions { - _options.ObjectIdentifier = core.StringPtr(objectIdentifier) - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *PublicPublishObjectOptions) SetHeaders(param map[string]string) *PublicPublishObjectOptions { - options.Headers = param - return options -} - -// PublicPublishVersionOptions : The PublicPublishVersion options. -type PublicPublishVersionOptions struct { - // A dotted value of `catalogID`.`versionID`. - VersionLocID *string `json:"version_loc_id" validate:"required,ne="` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewPublicPublishVersionOptions : Instantiate PublicPublishVersionOptions -func (*CatalogManagementV1) NewPublicPublishVersionOptions(versionLocID string) *PublicPublishVersionOptions { - return &PublicPublishVersionOptions{ - VersionLocID: core.StringPtr(versionLocID), - } -} - -// SetVersionLocID : Allow user to set VersionLocID -func (_options *PublicPublishVersionOptions) SetVersionLocID(versionLocID string) *PublicPublishVersionOptions { - _options.VersionLocID = core.StringPtr(versionLocID) - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *PublicPublishVersionOptions) SetHeaders(param map[string]string) *PublicPublishVersionOptions { - options.Headers = param - return options -} - // PublishObject : Publish information. type PublishObject struct { // Is it permitted to request publishing to IBM or Public. @@ -16429,7 +16122,7 @@ type RenderType struct { GroupingIndex *int64 `json:"grouping_index,omitempty"` // Map of constraint parameters that will be passed to the custom widget. - ConfigConstraints interface{} `json:"config_constraints,omitempty"` + ConfigConstraints map[string]interface{} `json:"config_constraints,omitempty"` // List of parameters that are associated with this configuration. Associations *RenderTypeAssociations `json:"associations,omitempty"` @@ -16533,6 +16226,9 @@ type ReplaceCatalogOptions struct { // URL for an icon associated with this catalog. CatalogIconURL *string `json:"catalog_icon_url,omitempty"` + // URL for a banner image for this catalog. + CatalogBannerURL *string `json:"catalog_banner_url,omitempty"` + // List of tags associated with this catalog. Tags []string `json:"tags,omitempty"` @@ -16619,6 +16315,12 @@ func (_options *ReplaceCatalogOptions) SetCatalogIconURL(catalogIconURL string) return _options } +// SetCatalogBannerURL : Allow user to set CatalogBannerURL +func (_options *ReplaceCatalogOptions) SetCatalogBannerURL(catalogBannerURL string) *ReplaceCatalogOptions { + _options.CatalogBannerURL = core.StringPtr(catalogBannerURL) + return _options +} + // SetTags : Allow user to set Tags func (_options *ReplaceCatalogOptions) SetTags(tags []string) *ReplaceCatalogOptions { _options.Tags = tags @@ -16690,12 +16392,12 @@ type ReplaceObjectOptions struct { // unique id. ID *string `json:"id,omitempty"` - // The programmatic name of this object. - Name *string `json:"name,omitempty"` - // Cloudant revision. Rev *string `json:"_rev,omitempty"` + // The programmatic name of this object. + Name *string `json:"name,omitempty"` + // The crn for this specific object. CRN *string `json:"crn,omitempty"` @@ -16774,18 +16476,18 @@ func (_options *ReplaceObjectOptions) SetID(id string) *ReplaceObjectOptions { return _options } -// SetName : Allow user to set Name -func (_options *ReplaceObjectOptions) SetName(name string) *ReplaceObjectOptions { - _options.Name = core.StringPtr(name) - return _options -} - // SetRev : Allow user to set Rev func (_options *ReplaceObjectOptions) SetRev(rev string) *ReplaceObjectOptions { _options.Rev = core.StringPtr(rev) return _options } +// SetName : Allow user to set Name +func (_options *ReplaceObjectOptions) SetName(name string) *ReplaceObjectOptions { + _options.Name = core.StringPtr(name) + return _options +} + // SetCRN : Allow user to set CRN func (_options *ReplaceObjectOptions) SetCRN(crn string) *ReplaceObjectOptions { _options.CRN = core.StringPtr(crn) @@ -16976,12 +16678,15 @@ type ReplaceOfferingOptions struct { ShareEnabled *bool `json:"share_enabled,omitempty"` // Is it permitted to request publishing to IBM or Public. + // Deprecated: this field is deprecated and may be removed in a future release. PermitRequestIBMPublicPublish *bool `json:"permit_request_ibm_public_publish,omitempty"` // Indicates if this offering has been approved for use by all IBMers. + // Deprecated: this field is deprecated and may be removed in a future release. IBMPublishApproved *bool `json:"ibm_publish_approved,omitempty"` // Indicates if this offering has been approved for use by all IBM Cloud users. + // Deprecated: this field is deprecated and may be removed in a future release. PublicPublishApproved *bool `json:"public_publish_approved,omitempty"` // The original offering CRN that this publish entry came from. @@ -17012,6 +16717,7 @@ type ReplaceOfferingOptions struct { Hidden *bool `json:"hidden,omitempty"` // Deprecated - Provider of this offering. + // Deprecated: this field is deprecated and may be removed in a future release. Provider *string `json:"provider,omitempty"` // Information on the provider for this offering, or omitted if no provider information is given. @@ -17219,18 +16925,21 @@ func (_options *ReplaceOfferingOptions) SetShareEnabled(shareEnabled bool) *Repl } // SetPermitRequestIBMPublicPublish : Allow user to set PermitRequestIBMPublicPublish +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *ReplaceOfferingOptions) SetPermitRequestIBMPublicPublish(permitRequestIBMPublicPublish bool) *ReplaceOfferingOptions { _options.PermitRequestIBMPublicPublish = core.BoolPtr(permitRequestIBMPublicPublish) return _options } // SetIBMPublishApproved : Allow user to set IBMPublishApproved +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *ReplaceOfferingOptions) SetIBMPublishApproved(ibmPublishApproved bool) *ReplaceOfferingOptions { _options.IBMPublishApproved = core.BoolPtr(ibmPublishApproved) return _options } // SetPublicPublishApproved : Allow user to set PublicPublishApproved +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *ReplaceOfferingOptions) SetPublicPublishApproved(publicPublishApproved bool) *ReplaceOfferingOptions { _options.PublicPublishApproved = core.BoolPtr(publicPublishApproved) return _options @@ -17291,6 +17000,7 @@ func (_options *ReplaceOfferingOptions) SetHidden(hidden bool) *ReplaceOfferingO } // SetProvider : Allow user to set Provider +// Deprecated: this method is deprecated and may be removed in a future release. func (_options *ReplaceOfferingOptions) SetProvider(provider string) *ReplaceOfferingOptions { _options.Provider = core.StringPtr(provider) return _options @@ -17735,10 +17445,7 @@ type SetOfferingPublishOptions struct { // * `ibm` - (deprecated) // * `public` - (deprecated). const ( - SetOfferingPublishOptionsApprovalTypeAllowRequestConst = "allow_request" - SetOfferingPublishOptionsApprovalTypeIBMConst = "ibm" SetOfferingPublishOptionsApprovalTypePcManagedConst = "pc_managed" - SetOfferingPublishOptionsApprovalTypePublicConst = "public" SetOfferingPublishOptionsApprovalTypePublishApprovedConst = "publish_approved" ) @@ -17968,44 +17675,6 @@ func UnmarshalShareSetting(m map[string]json.RawMessage, result interface{}) (er return } -// SharedPublishObjectOptions : The SharedPublishObject options. -type SharedPublishObjectOptions struct { - // Catalog identifier. - CatalogIdentifier *string `json:"catalog_identifier" validate:"required,ne="` - - // Object identifier. - ObjectIdentifier *string `json:"object_identifier" validate:"required,ne="` - - // Allows users to set headers on API requests - Headers map[string]string -} - -// NewSharedPublishObjectOptions : Instantiate SharedPublishObjectOptions -func (*CatalogManagementV1) NewSharedPublishObjectOptions(catalogIdentifier string, objectIdentifier string) *SharedPublishObjectOptions { - return &SharedPublishObjectOptions{ - CatalogIdentifier: core.StringPtr(catalogIdentifier), - ObjectIdentifier: core.StringPtr(objectIdentifier), - } -} - -// SetCatalogIdentifier : Allow user to set CatalogIdentifier -func (_options *SharedPublishObjectOptions) SetCatalogIdentifier(catalogIdentifier string) *SharedPublishObjectOptions { - _options.CatalogIdentifier = core.StringPtr(catalogIdentifier) - return _options -} - -// SetObjectIdentifier : Allow user to set ObjectIdentifier -func (_options *SharedPublishObjectOptions) SetObjectIdentifier(objectIdentifier string) *SharedPublishObjectOptions { - _options.ObjectIdentifier = core.StringPtr(objectIdentifier) - return _options -} - -// SetHeaders : Allow user to set Headers -func (options *SharedPublishObjectOptions) SetHeaders(param map[string]string) *SharedPublishObjectOptions { - options.Headers = param - return options -} - // SolutionInfo : Version Solution Information. Only supported for Product kind Solution. type SolutionInfo struct { // Architecture diagrams for this solution. @@ -18018,7 +17687,7 @@ type SolutionInfo struct { CostEstimate *CostEstimate `json:"cost_estimate,omitempty"` // Dependencies for this solution. - Dependencies []Dependency `json:"dependencies,omitempty"` + Dependencies []OfferingReference `json:"dependencies,omitempty"` } // UnmarshalSolutionInfo unmarshals an instance of SolutionInfo from the specified map of raw messages. @@ -18036,7 +17705,7 @@ func UnmarshalSolutionInfo(m map[string]json.RawMessage, result interface{}) (er if err != nil { return } - err = core.UnmarshalModel(m, "dependencies", &obj.Dependencies, UnmarshalDependency) + err = core.UnmarshalModel(m, "dependencies", &obj.Dependencies, UnmarshalOfferingReference) if err != nil { return } @@ -18046,19 +17715,19 @@ func UnmarshalSolutionInfo(m map[string]json.RawMessage, result interface{}) (er // State : Offering state. type State struct { - // one of: new, validated, account-published, ibm-published, public-published. + // one of: new, validated, consumable. Current *string `json:"current,omitempty"` // Date and time of current request. CurrentEntered *strfmt.DateTime `json:"current_entered,omitempty"` - // one of: new, validated, account-published, ibm-published, public-published. + // one of: new, validated, consumable. Pending *string `json:"pending,omitempty"` // Date and time of pending request. PendingRequested *strfmt.DateTime `json:"pending_requested,omitempty"` - // one of: new, validated, account-published, ibm-published, public-published. + // one of: new, validated, consumable. Previous *string `json:"previous,omitempty"` } @@ -18956,6 +18625,9 @@ type Version struct { // Is the version able to be shared. IsConsumable *bool `json:"is_consumable,omitempty"` + + // List of links to sec./compliance controls. + Compliance []ComplianceControl `json:"compliance,omitempty"` } // UnmarshalVersion unmarshals an instance of Version from the specified map of raw messages. @@ -19113,6 +18785,10 @@ func UnmarshalVersion(m map[string]json.RawMessage, result interface{}) (err err if err != nil { return } + err = core.UnmarshalModel(m, "compliance", &obj.Compliance, UnmarshalComplianceControl) + if err != nil { + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } @@ -19208,55 +18884,472 @@ func UnmarshalVersionUpdateDescriptor(m map[string]json.RawMessage, result inter if err != nil { return } - err = core.UnmarshalModel(m, "state", &obj.State, UnmarshalState) - if err != nil { + err = core.UnmarshalModel(m, "state", &obj.State, UnmarshalState) + if err != nil { + return + } + err = core.UnmarshalModel(m, "required_resources", &obj.RequiredResources, UnmarshalResource) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "package_version", &obj.PackageVersion) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "sha", &obj.Sha) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "can_update", &obj.CanUpdate) + if err != nil { + return + } + err = core.UnmarshalPrimitive(m, "messages", &obj.Messages) + if err != nil { + return + } + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) + return +} + +// +// CatalogAccountAuditsPager can be used to simplify the use of the "ListCatalogAccountAudits" method. +// +type CatalogAccountAuditsPager struct { + hasNext bool + options *ListCatalogAccountAuditsOptions + client *CatalogManagementV1 + pageContext struct { + next *string + } +} + +// NewCatalogAccountAuditsPager returns a new CatalogAccountAuditsPager instance. +func (catalogManagement *CatalogManagementV1) NewCatalogAccountAuditsPager(options *ListCatalogAccountAuditsOptions) (pager *CatalogAccountAuditsPager, err error) { + if options.Start != nil && *options.Start != "" { + err = fmt.Errorf("the 'options.Start' field should not be set") + return + } + + var optionsCopy ListCatalogAccountAuditsOptions = *options + pager = &CatalogAccountAuditsPager{ + hasNext: true, + options: &optionsCopy, + client: catalogManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *CatalogAccountAuditsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *CatalogAccountAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListCatalogAccountAuditsWithContext(ctx, pager.options) + if err != nil { + return + } + + var next *string + if result.Next != nil { + next = result.Next.Start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Audits + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *CatalogAccountAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { + for pager.HasNext() { + var nextPage []AuditLogDigest + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *CatalogAccountAuditsPager) GetNext() (page []AuditLogDigest, err error) { + return pager.GetNextWithContext(context.Background()) +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *CatalogAccountAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { + return pager.GetAllWithContext(context.Background()) +} + +// +// CatalogAuditsPager can be used to simplify the use of the "ListCatalogAudits" method. +// +type CatalogAuditsPager struct { + hasNext bool + options *ListCatalogAuditsOptions + client *CatalogManagementV1 + pageContext struct { + next *string + } +} + +// NewCatalogAuditsPager returns a new CatalogAuditsPager instance. +func (catalogManagement *CatalogManagementV1) NewCatalogAuditsPager(options *ListCatalogAuditsOptions) (pager *CatalogAuditsPager, err error) { + if options.Start != nil && *options.Start != "" { + err = fmt.Errorf("the 'options.Start' field should not be set") + return + } + + var optionsCopy ListCatalogAuditsOptions = *options + pager = &CatalogAuditsPager{ + hasNext: true, + options: &optionsCopy, + client: catalogManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *CatalogAuditsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *CatalogAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListCatalogAuditsWithContext(ctx, pager.options) + if err != nil { + return + } + + var next *string + if result.Next != nil { + next = result.Next.Start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Audits + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *CatalogAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { + for pager.HasNext() { + var nextPage []AuditLogDigest + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *CatalogAuditsPager) GetNext() (page []AuditLogDigest, err error) { + return pager.GetNextWithContext(context.Background()) +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *CatalogAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { + return pager.GetAllWithContext(context.Background()) +} + +// +// EnterpriseAuditsPager can be used to simplify the use of the "ListEnterpriseAudits" method. +// +type EnterpriseAuditsPager struct { + hasNext bool + options *ListEnterpriseAuditsOptions + client *CatalogManagementV1 + pageContext struct { + next *string + } +} + +// NewEnterpriseAuditsPager returns a new EnterpriseAuditsPager instance. +func (catalogManagement *CatalogManagementV1) NewEnterpriseAuditsPager(options *ListEnterpriseAuditsOptions) (pager *EnterpriseAuditsPager, err error) { + if options.Start != nil && *options.Start != "" { + err = fmt.Errorf("the 'options.Start' field should not be set") + return + } + + var optionsCopy ListEnterpriseAuditsOptions = *options + pager = &EnterpriseAuditsPager{ + hasNext: true, + options: &optionsCopy, + client: catalogManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *EnterpriseAuditsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *EnterpriseAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Start = pager.pageContext.next + + result, _, err := pager.client.ListEnterpriseAuditsWithContext(ctx, pager.options) + if err != nil { + return + } + + var next *string + if result.Next != nil { + next = result.Next.Start + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Audits + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *EnterpriseAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { + for pager.HasNext() { + var nextPage []AuditLogDigest + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *EnterpriseAuditsPager) GetNext() (page []AuditLogDigest, err error) { + return pager.GetNextWithContext(context.Background()) +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *EnterpriseAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { + return pager.GetAllWithContext(context.Background()) +} + +// +// GetConsumptionOfferingsPager can be used to simplify the use of the "GetConsumptionOfferings" method. +// +type GetConsumptionOfferingsPager struct { + hasNext bool + options *GetConsumptionOfferingsOptions + client *CatalogManagementV1 + pageContext struct { + next *int64 + } +} + +// NewGetConsumptionOfferingsPager returns a new GetConsumptionOfferingsPager instance. +func (catalogManagement *CatalogManagementV1) NewGetConsumptionOfferingsPager(options *GetConsumptionOfferingsOptions) (pager *GetConsumptionOfferingsPager, err error) { + if options.Offset != nil && *options.Offset != 0 { + err = fmt.Errorf("the 'options.Offset' field should not be set") + return + } + + var optionsCopy GetConsumptionOfferingsOptions = *options + pager = &GetConsumptionOfferingsPager{ + hasNext: true, + options: &optionsCopy, + client: catalogManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *GetConsumptionOfferingsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *GetConsumptionOfferingsPager) GetNextWithContext(ctx context.Context) (page []Offering, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Offset = pager.pageContext.next + + result, _, err := pager.client.GetConsumptionOfferingsWithContext(ctx, pager.options) + if err != nil { + return + } + + var next *int64 + if result.Next != nil { + var offset *int64 + offset, err = core.GetQueryParamAsInt(result.Next, "offset") + if err != nil { + err = fmt.Errorf("error retrieving 'offset' query parameter from URL '%s': %s", *result.Next, err.Error()) + return + } + next = offset + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Resources + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *GetConsumptionOfferingsPager) GetAllWithContext(ctx context.Context) (allItems []Offering, err error) { + for pager.HasNext() { + var nextPage []Offering + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *GetConsumptionOfferingsPager) GetNext() (page []Offering, err error) { + return pager.GetNextWithContext(context.Background()) +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *GetConsumptionOfferingsPager) GetAll() (allItems []Offering, err error) { + return pager.GetAllWithContext(context.Background()) +} + +// +// OfferingsPager can be used to simplify the use of the "ListOfferings" method. +// +type OfferingsPager struct { + hasNext bool + options *ListOfferingsOptions + client *CatalogManagementV1 + pageContext struct { + next *int64 + } +} + +// NewOfferingsPager returns a new OfferingsPager instance. +func (catalogManagement *CatalogManagementV1) NewOfferingsPager(options *ListOfferingsOptions) (pager *OfferingsPager, err error) { + if options.Offset != nil && *options.Offset != 0 { + err = fmt.Errorf("the 'options.Offset' field should not be set") return } - err = core.UnmarshalModel(m, "required_resources", &obj.RequiredResources, UnmarshalResource) - if err != nil { - return + + var optionsCopy ListOfferingsOptions = *options + pager = &OfferingsPager{ + hasNext: true, + options: &optionsCopy, + client: catalogManagement, } - err = core.UnmarshalPrimitive(m, "package_version", &obj.PackageVersion) - if err != nil { - return + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *OfferingsPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *OfferingsPager) GetNextWithContext(ctx context.Context) (page []Offering, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") } - err = core.UnmarshalPrimitive(m, "sha", &obj.Sha) + + pager.options.Offset = pager.pageContext.next + + result, _, err := pager.client.ListOfferingsWithContext(ctx, pager.options) if err != nil { return } - err = core.UnmarshalPrimitive(m, "can_update", &obj.CanUpdate) - if err != nil { - return + + var next *int64 + if result.Next != nil { + var offset *int64 + offset, err = core.GetQueryParamAsInt(result.Next, "offset") + if err != nil { + err = fmt.Errorf("error retrieving 'offset' query parameter from URL '%s': %s", *result.Next, err.Error()) + return + } + next = offset } - err = core.UnmarshalPrimitive(m, "messages", &obj.Messages) - if err != nil { - return + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Resources + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *OfferingsPager) GetAllWithContext(ctx context.Context) (allItems []Offering, err error) { + for pager.HasNext() { + var nextPage []Offering + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + return + } + allItems = append(allItems, nextPage...) } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *OfferingsPager) GetNext() (page []Offering, err error) { + return pager.GetNextWithContext(context.Background()) +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *OfferingsPager) GetAll() (allItems []Offering, err error) { + return pager.GetAllWithContext(context.Background()) +} + // -// CatalogAccountAuditsPager can be used to simplify the use of the "ListCatalogAccountAudits" method. +// OfferingAuditsPager can be used to simplify the use of the "ListOfferingAudits" method. // -type CatalogAccountAuditsPager struct { +type OfferingAuditsPager struct { hasNext bool - options *ListCatalogAccountAuditsOptions + options *ListOfferingAuditsOptions client *CatalogManagementV1 pageContext struct { next *string } } -// NewCatalogAccountAuditsPager returns a new CatalogAccountAuditsPager instance. -func (catalogManagement *CatalogManagementV1) NewCatalogAccountAuditsPager(options *ListCatalogAccountAuditsOptions) (pager *CatalogAccountAuditsPager, err error) { +// NewOfferingAuditsPager returns a new OfferingAuditsPager instance. +func (catalogManagement *CatalogManagementV1) NewOfferingAuditsPager(options *ListOfferingAuditsOptions) (pager *OfferingAuditsPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } - var optionsCopy ListCatalogAccountAuditsOptions = *options - pager = &CatalogAccountAuditsPager{ + var optionsCopy ListOfferingAuditsOptions = *options + pager = &OfferingAuditsPager{ hasNext: true, options: &optionsCopy, client: catalogManagement, @@ -19265,19 +19358,19 @@ func (catalogManagement *CatalogManagementV1) NewCatalogAccountAuditsPager(optio } // HasNext returns true if there are potentially more results to be retrieved. -func (pager *CatalogAccountAuditsPager) HasNext() bool { +func (pager *OfferingAuditsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. -func (pager *CatalogAccountAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { +func (pager *OfferingAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next - result, _, err := pager.client.ListCatalogAccountAuditsWithContext(ctx, pager.options) + result, _, err := pager.client.ListOfferingAuditsWithContext(ctx, pager.options) if err != nil { return } @@ -19295,7 +19388,7 @@ func (pager *CatalogAccountAuditsPager) GetNextWithContext(ctx context.Context) // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. -func (pager *CatalogAccountAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { +func (pager *OfferingAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { for pager.HasNext() { var nextPage []AuditLogDigest nextPage, err = pager.GetNextWithContext(ctx) @@ -19308,36 +19401,36 @@ func (pager *CatalogAccountAuditsPager) GetAllWithContext(ctx context.Context) ( } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. -func (pager *CatalogAccountAuditsPager) GetNext() (page []AuditLogDigest, err error) { +func (pager *OfferingAuditsPager) GetNext() (page []AuditLogDigest, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. -func (pager *CatalogAccountAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { +func (pager *OfferingAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { return pager.GetAllWithContext(context.Background()) } // -// CatalogAuditsPager can be used to simplify the use of the "ListCatalogAudits" method. +// GetOfferingAccessListPager can be used to simplify the use of the "GetOfferingAccessList" method. // -type CatalogAuditsPager struct { +type GetOfferingAccessListPager struct { hasNext bool - options *ListCatalogAuditsOptions + options *GetOfferingAccessListOptions client *CatalogManagementV1 pageContext struct { next *string } } -// NewCatalogAuditsPager returns a new CatalogAuditsPager instance. -func (catalogManagement *CatalogManagementV1) NewCatalogAuditsPager(options *ListCatalogAuditsOptions) (pager *CatalogAuditsPager, err error) { +// NewGetOfferingAccessListPager returns a new GetOfferingAccessListPager instance. +func (catalogManagement *CatalogManagementV1) NewGetOfferingAccessListPager(options *GetOfferingAccessListOptions) (pager *GetOfferingAccessListPager, err error) { if options.Start != nil && *options.Start != "" { err = fmt.Errorf("the 'options.Start' field should not be set") return } - var optionsCopy ListCatalogAuditsOptions = *options - pager = &CatalogAuditsPager{ + var optionsCopy GetOfferingAccessListOptions = *options + pager = &GetOfferingAccessListPager{ hasNext: true, options: &optionsCopy, client: catalogManagement, @@ -19346,19 +19439,19 @@ func (catalogManagement *CatalogManagementV1) NewCatalogAuditsPager(options *Lis } // HasNext returns true if there are potentially more results to be retrieved. -func (pager *CatalogAuditsPager) HasNext() bool { +func (pager *GetOfferingAccessListPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. -func (pager *CatalogAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { +func (pager *GetOfferingAccessListPager) GetNextWithContext(ctx context.Context) (page []Access, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } pager.options.Start = pager.pageContext.next - result, _, err := pager.client.ListCatalogAuditsWithContext(ctx, pager.options) + result, _, err := pager.client.GetOfferingAccessListWithContext(ctx, pager.options) if err != nil { return } @@ -19369,16 +19462,16 @@ func (pager *CatalogAuditsPager) GetNextWithContext(ctx context.Context) (page [ } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) - page = result.Audits + page = result.Resources return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. -func (pager *CatalogAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { +func (pager *GetOfferingAccessListPager) GetAllWithContext(ctx context.Context) (allItems []Access, err error) { for pager.HasNext() { - var nextPage []AuditLogDigest + var nextPage []Access nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return @@ -19389,36 +19482,36 @@ func (pager *CatalogAuditsPager) GetAllWithContext(ctx context.Context) (allItem } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. -func (pager *CatalogAuditsPager) GetNext() (page []AuditLogDigest, err error) { +func (pager *GetOfferingAccessListPager) GetNext() (page []Access, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. -func (pager *CatalogAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { +func (pager *GetOfferingAccessListPager) GetAll() (allItems []Access, err error) { return pager.GetAllWithContext(context.Background()) } // -// EnterpriseAuditsPager can be used to simplify the use of the "ListEnterpriseAudits" method. +// GetNamespacesPager can be used to simplify the use of the "GetNamespaces" method. // -type EnterpriseAuditsPager struct { +type GetNamespacesPager struct { hasNext bool - options *ListEnterpriseAuditsOptions + options *GetNamespacesOptions client *CatalogManagementV1 pageContext struct { - next *string + next *int64 } } -// NewEnterpriseAuditsPager returns a new EnterpriseAuditsPager instance. -func (catalogManagement *CatalogManagementV1) NewEnterpriseAuditsPager(options *ListEnterpriseAuditsOptions) (pager *EnterpriseAuditsPager, err error) { - if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") +// NewGetNamespacesPager returns a new GetNamespacesPager instance. +func (catalogManagement *CatalogManagementV1) NewGetNamespacesPager(options *GetNamespacesOptions) (pager *GetNamespacesPager, err error) { + if options.Offset != nil && *options.Offset != 0 { + err = fmt.Errorf("the 'options.Offset' field should not be set") return } - var optionsCopy ListEnterpriseAuditsOptions = *options - pager = &EnterpriseAuditsPager{ + var optionsCopy GetNamespacesOptions = *options + pager = &GetNamespacesPager{ hasNext: true, options: &optionsCopy, client: catalogManagement, @@ -19427,39 +19520,45 @@ func (catalogManagement *CatalogManagementV1) NewEnterpriseAuditsPager(options * } // HasNext returns true if there are potentially more results to be retrieved. -func (pager *EnterpriseAuditsPager) HasNext() bool { +func (pager *GetNamespacesPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. -func (pager *EnterpriseAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { +func (pager *GetNamespacesPager) GetNextWithContext(ctx context.Context) (page []string, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } - pager.options.Start = pager.pageContext.next + pager.options.Offset = pager.pageContext.next - result, _, err := pager.client.ListEnterpriseAuditsWithContext(ctx, pager.options) + result, _, err := pager.client.GetNamespacesWithContext(ctx, pager.options) if err != nil { return } - var next *string + var next *int64 if result.Next != nil { - next = result.Next.Start + var offset *int64 + offset, err = core.GetQueryParamAsInt(result.Next, "offset") + if err != nil { + err = fmt.Errorf("error retrieving 'offset' query parameter from URL '%s': %s", *result.Next, err.Error()) + return + } + next = offset } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) - page = result.Audits + page = result.Resources return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. -func (pager *EnterpriseAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { +func (pager *GetNamespacesPager) GetAllWithContext(ctx context.Context) (allItems []string, err error) { for pager.HasNext() { - var nextPage []AuditLogDigest + var nextPage []string nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return @@ -19470,36 +19569,36 @@ func (pager *EnterpriseAuditsPager) GetAllWithContext(ctx context.Context) (allI } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. -func (pager *EnterpriseAuditsPager) GetNext() (page []AuditLogDigest, err error) { +func (pager *GetNamespacesPager) GetNext() (page []string, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. -func (pager *EnterpriseAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { +func (pager *GetNamespacesPager) GetAll() (allItems []string, err error) { return pager.GetAllWithContext(context.Background()) } // -// OfferingAuditsPager can be used to simplify the use of the "ListOfferingAudits" method. +// SearchObjectsPager can be used to simplify the use of the "SearchObjects" method. // -type OfferingAuditsPager struct { +type SearchObjectsPager struct { hasNext bool - options *ListOfferingAuditsOptions + options *SearchObjectsOptions client *CatalogManagementV1 pageContext struct { - next *string + next *int64 } } -// NewOfferingAuditsPager returns a new OfferingAuditsPager instance. -func (catalogManagement *CatalogManagementV1) NewOfferingAuditsPager(options *ListOfferingAuditsOptions) (pager *OfferingAuditsPager, err error) { - if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") +// NewSearchObjectsPager returns a new SearchObjectsPager instance. +func (catalogManagement *CatalogManagementV1) NewSearchObjectsPager(options *SearchObjectsOptions) (pager *SearchObjectsPager, err error) { + if options.Offset != nil && *options.Offset != 0 { + err = fmt.Errorf("the 'options.Offset' field should not be set") return } - var optionsCopy ListOfferingAuditsOptions = *options - pager = &OfferingAuditsPager{ + var optionsCopy SearchObjectsOptions = *options + pager = &SearchObjectsPager{ hasNext: true, options: &optionsCopy, client: catalogManagement, @@ -19508,39 +19607,45 @@ func (catalogManagement *CatalogManagementV1) NewOfferingAuditsPager(options *Li } // HasNext returns true if there are potentially more results to be retrieved. -func (pager *OfferingAuditsPager) HasNext() bool { +func (pager *SearchObjectsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. -func (pager *OfferingAuditsPager) GetNextWithContext(ctx context.Context) (page []AuditLogDigest, err error) { +func (pager *SearchObjectsPager) GetNextWithContext(ctx context.Context) (page []CatalogObject, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } - pager.options.Start = pager.pageContext.next + pager.options.Offset = pager.pageContext.next - result, _, err := pager.client.ListOfferingAuditsWithContext(ctx, pager.options) + result, _, err := pager.client.SearchObjectsWithContext(ctx, pager.options) if err != nil { return } - var next *string + var next *int64 if result.Next != nil { - next = result.Next.Start + var offset *int64 + offset, err = core.GetQueryParamAsInt(result.Next, "offset") + if err != nil { + err = fmt.Errorf("error retrieving 'offset' query parameter from URL '%s': %s", *result.Next, err.Error()) + return + } + next = offset } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) - page = result.Audits + page = result.Resources return } // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. -func (pager *OfferingAuditsPager) GetAllWithContext(ctx context.Context) (allItems []AuditLogDigest, err error) { +func (pager *SearchObjectsPager) GetAllWithContext(ctx context.Context) (allItems []CatalogObject, err error) { for pager.HasNext() { - var nextPage []AuditLogDigest + var nextPage []CatalogObject nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return @@ -19551,36 +19656,36 @@ func (pager *OfferingAuditsPager) GetAllWithContext(ctx context.Context) (allIte } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. -func (pager *OfferingAuditsPager) GetNext() (page []AuditLogDigest, err error) { +func (pager *SearchObjectsPager) GetNext() (page []CatalogObject, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. -func (pager *OfferingAuditsPager) GetAll() (allItems []AuditLogDigest, err error) { +func (pager *SearchObjectsPager) GetAll() (allItems []CatalogObject, err error) { return pager.GetAllWithContext(context.Background()) } // -// GetOfferingAccessListPager can be used to simplify the use of the "GetOfferingAccessList" method. +// ObjectsPager can be used to simplify the use of the "ListObjects" method. // -type GetOfferingAccessListPager struct { +type ObjectsPager struct { hasNext bool - options *GetOfferingAccessListOptions + options *ListObjectsOptions client *CatalogManagementV1 pageContext struct { - next *string + next *int64 } } -// NewGetOfferingAccessListPager returns a new GetOfferingAccessListPager instance. -func (catalogManagement *CatalogManagementV1) NewGetOfferingAccessListPager(options *GetOfferingAccessListOptions) (pager *GetOfferingAccessListPager, err error) { - if options.Start != nil && *options.Start != "" { - err = fmt.Errorf("the 'options.Start' field should not be set") +// NewObjectsPager returns a new ObjectsPager instance. +func (catalogManagement *CatalogManagementV1) NewObjectsPager(options *ListObjectsOptions) (pager *ObjectsPager, err error) { + if options.Offset != nil && *options.Offset != 0 { + err = fmt.Errorf("the 'options.Offset' field should not be set") return } - var optionsCopy GetOfferingAccessListOptions = *options - pager = &GetOfferingAccessListPager{ + var optionsCopy ListObjectsOptions = *options + pager = &ObjectsPager{ hasNext: true, options: &optionsCopy, client: catalogManagement, @@ -19589,26 +19694,32 @@ func (catalogManagement *CatalogManagementV1) NewGetOfferingAccessListPager(opti } // HasNext returns true if there are potentially more results to be retrieved. -func (pager *GetOfferingAccessListPager) HasNext() bool { +func (pager *ObjectsPager) HasNext() bool { return pager.hasNext } // GetNextWithContext returns the next page of results using the specified Context. -func (pager *GetOfferingAccessListPager) GetNextWithContext(ctx context.Context) (page []Access, err error) { +func (pager *ObjectsPager) GetNextWithContext(ctx context.Context) (page []CatalogObject, err error) { if !pager.HasNext() { return nil, fmt.Errorf("no more results available") } - pager.options.Start = pager.pageContext.next + pager.options.Offset = pager.pageContext.next - result, _, err := pager.client.GetOfferingAccessListWithContext(ctx, pager.options) + result, _, err := pager.client.ListObjectsWithContext(ctx, pager.options) if err != nil { return } - var next *string + var next *int64 if result.Next != nil { - next = result.Next.Start + var offset *int64 + offset, err = core.GetQueryParamAsInt(result.Next, "offset") + if err != nil { + err = fmt.Errorf("error retrieving 'offset' query parameter from URL '%s': %s", *result.Next, err.Error()) + return + } + next = offset } pager.pageContext.next = next pager.hasNext = (pager.pageContext.next != nil) @@ -19619,9 +19730,9 @@ func (pager *GetOfferingAccessListPager) GetNextWithContext(ctx context.Context) // GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly // until all pages of results have been retrieved. -func (pager *GetOfferingAccessListPager) GetAllWithContext(ctx context.Context) (allItems []Access, err error) { +func (pager *ObjectsPager) GetAllWithContext(ctx context.Context) (allItems []CatalogObject, err error) { for pager.HasNext() { - var nextPage []Access + var nextPage []CatalogObject nextPage, err = pager.GetNextWithContext(ctx) if err != nil { return @@ -19632,12 +19743,12 @@ func (pager *GetOfferingAccessListPager) GetAllWithContext(ctx context.Context) } // GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. -func (pager *GetOfferingAccessListPager) GetNext() (page []Access, err error) { +func (pager *ObjectsPager) GetNext() (page []CatalogObject, err error) { return pager.GetNextWithContext(context.Background()) } // GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. -func (pager *GetOfferingAccessListPager) GetAll() (allItems []Access, err error) { +func (pager *ObjectsPager) GetAll() (allItems []CatalogObject, err error) { return pager.GetAllWithContext(context.Background()) } @@ -19803,6 +19914,93 @@ func (pager *GetObjectAccessListPager) GetAll() (allItems []Access, err error) { return pager.GetAllWithContext(context.Background()) } +// +// GetObjectAccessListDeprecatedPager can be used to simplify the use of the "GetObjectAccessListDeprecated" method. +// +type GetObjectAccessListDeprecatedPager struct { + hasNext bool + options *GetObjectAccessListDeprecatedOptions + client *CatalogManagementV1 + pageContext struct { + next *int64 + } +} + +// NewGetObjectAccessListDeprecatedPager returns a new GetObjectAccessListDeprecatedPager instance. +func (catalogManagement *CatalogManagementV1) NewGetObjectAccessListDeprecatedPager(options *GetObjectAccessListDeprecatedOptions) (pager *GetObjectAccessListDeprecatedPager, err error) { + if options.Offset != nil && *options.Offset != 0 { + err = fmt.Errorf("the 'options.Offset' field should not be set") + return + } + + var optionsCopy GetObjectAccessListDeprecatedOptions = *options + pager = &GetObjectAccessListDeprecatedPager{ + hasNext: true, + options: &optionsCopy, + client: catalogManagement, + } + return +} + +// HasNext returns true if there are potentially more results to be retrieved. +func (pager *GetObjectAccessListDeprecatedPager) HasNext() bool { + return pager.hasNext +} + +// GetNextWithContext returns the next page of results using the specified Context. +func (pager *GetObjectAccessListDeprecatedPager) GetNextWithContext(ctx context.Context) (page []Access, err error) { + if !pager.HasNext() { + return nil, fmt.Errorf("no more results available") + } + + pager.options.Offset = pager.pageContext.next + + result, _, err := pager.client.GetObjectAccessListDeprecatedWithContext(ctx, pager.options) + if err != nil { + return + } + + var next *int64 + if result.Next != nil { + var offset *int64 + offset, err = core.GetQueryParamAsInt(result.Next, "offset") + if err != nil { + err = fmt.Errorf("error retrieving 'offset' query parameter from URL '%s': %s", *result.Next, err.Error()) + return + } + next = offset + } + pager.pageContext.next = next + pager.hasNext = (pager.pageContext.next != nil) + page = result.Resources + + return +} + +// GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly +// until all pages of results have been retrieved. +func (pager *GetObjectAccessListDeprecatedPager) GetAllWithContext(ctx context.Context) (allItems []Access, err error) { + for pager.HasNext() { + var nextPage []Access + nextPage, err = pager.GetNextWithContext(ctx) + if err != nil { + return + } + allItems = append(allItems, nextPage...) + } + return +} + +// GetNext invokes GetNextWithContext() using context.Background() as the Context parameter. +func (pager *GetObjectAccessListDeprecatedPager) GetNext() (page []Access, err error) { + return pager.GetNextWithContext(context.Background()) +} + +// GetAll invokes GetAllWithContext() using context.Background() as the Context parameter. +func (pager *GetObjectAccessListDeprecatedPager) GetAll() (allItems []Access, err error) { + return pager.GetAllWithContext(context.Background()) +} + // // OfferingInstanceAuditsPager can be used to simplify the use of the "ListOfferingInstanceAudits" method. // diff --git a/catalogmanagementv1/catalog_management_v1_examples_test.go b/catalogmanagementv1/catalog_management_v1_examples_test.go index 22eb2606..91771d42 100644 --- a/catalogmanagementv1/catalog_management_v1_examples_test.go +++ b/catalogmanagementv1/catalog_management_v1_examples_test.go @@ -667,66 +667,6 @@ var _ = Describe(`CatalogManagementV1 Examples Tests`, func() { Expect(response.StatusCode).To(Equal(202)) }) - It(`AccountPublishVersion request example`, func() { - Skip("Skipped by design.") - // begin-account_publish_version - - accountPublishVersionOptions := catalogManagementService.NewAccountPublishVersionOptions( - versionLocatorID, - ) - - response, err := catalogManagementService.AccountPublishVersion(accountPublishVersionOptions) - if err != nil { - panic(err) - } - - // end-account_publish_version - fmt.Printf("\nAccountPublishVersion() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - - It(`IBMPublishVersion request example`, func() { - Skip("Skipped by design.") - // begin-ibm_publish_version - - ibmPublishVersionOptions := catalogManagementService.NewIBMPublishVersionOptions( - versionLocatorID, - ) - - response, err := catalogManagementService.IBMPublishVersion(ibmPublishVersionOptions) - if err != nil { - panic(err) - } - - // end-ibm_publish_version - fmt.Printf("\nIBMPublishVersion() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - - It(`PublicPublishVersion request example`, func() { - Skip("Skipped by design.") - // begin-public_publish_version - - publicPublishVersionOptions := catalogManagementService.NewPublicPublishVersionOptions( - versionLocatorID, - ) - - response, err := catalogManagementService.PublicPublishVersion(publicPublishVersionOptions) - if err != nil { - panic(err) - } - - // end-public_publish_version - fmt.Printf("\nPublicPublishVersion() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - It(`CommitVersion request example`, func() { Skip("Skipped by design.") // begin-commit_version @@ -1179,111 +1119,6 @@ var _ = Describe(`CatalogManagementV1 Examples Tests`, func() { Expect(catalogObject).ToNot(BeNil()) }) - It(`AccountPublishObject request example`, func() { - Skip("Skipped by design.") - // begin-account_publish_object - - accountPublishObjectOptions := catalogManagementService.NewAccountPublishObjectOptions( - objectCatalogID, - objectID, - ) - - response, err := catalogManagementService.AccountPublishObject(accountPublishObjectOptions) - if err != nil { - panic(err) - } - - // end-account_publish_object - fmt.Printf("\nAccountPublishObject() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - - It(`SharedPublishObject request example`, func() { - Skip("Skipped by design.") - // begin-shared_publish_object - - sharedPublishObjectOptions := catalogManagementService.NewSharedPublishObjectOptions( - objectCatalogID, - objectID, - ) - - response, err := catalogManagementService.SharedPublishObject(sharedPublishObjectOptions) - if err != nil { - panic(err) - } - - // end-shared_publish_object - fmt.Printf("\nSharedPublishObject() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - - It(`IBMPublishObject request example`, func() { - Skip("Skipped by design.") - // begin-ibm_publish_object - - ibmPublishObjectOptions := catalogManagementService.NewIBMPublishObjectOptions( - objectCatalogID, - objectID, - ) - - response, err := catalogManagementService.IBMPublishObject(ibmPublishObjectOptions) - if err != nil { - panic(err) - } - - // end-ibm_publish_object - fmt.Printf("\nIBMPublishObject() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - - It(`PublicPublishObject request example`, func() { - Skip("Skipped by design.") - // begin-public_publish_object - - publicPublishObjectOptions := catalogManagementService.NewPublicPublishObjectOptions( - objectCatalogID, - objectID, - ) - - response, err := catalogManagementService.PublicPublishObject(publicPublishObjectOptions) - if err != nil { - panic(err) - } - - // end-public_publish_object - fmt.Printf("\nPublicPublishObject() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - - It(`CreateObjectAccess request example`, func() { - // begin-create_object_access - - createObjectAccessOptions := catalogManagementService.NewCreateObjectAccessOptions( - objectCatalogID, - objectID, - accountID, - ) - - response, err := catalogManagementService.CreateObjectAccess(createObjectAccessOptions) - if err != nil { - panic(err) - } - - // end-create_object_access - fmt.Printf("\nCreateObjectAccess() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(201)) - }) - It(`GetObjectAccess request example`, func() { fmt.Println("\nGetObjectAccess() result:") // begin-get_object_access @@ -1531,27 +1366,6 @@ var _ = Describe(`CatalogManagementV1 Examples Tests`, func() { Expect(accessListBulkResponse).ToNot(BeNil()) }) - It(`DeleteObjectAccess request example`, func() { - // begin-delete_object_access - - deleteObjectAccessOptions := catalogManagementService.NewDeleteObjectAccessOptions( - objectCatalogID, - objectID, - accountID, - ) - - response, err := catalogManagementService.DeleteObjectAccess(deleteObjectAccessOptions) - if err != nil { - panic(err) - } - - // end-delete_object_access - fmt.Printf("\nDeleteObjectAccess() response status code: %d\n", response.StatusCode) - - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(200)) - }) - It(`DeleteObject request example`, func() { // begin-delete_object diff --git a/catalogmanagementv1/catalog_management_v1_integration_test.go b/catalogmanagementv1/catalog_management_v1_integration_test.go index 2eac512c..979bbd98 100644 --- a/catalogmanagementv1/catalog_management_v1_integration_test.go +++ b/catalogmanagementv1/catalog_management_v1_integration_test.go @@ -236,13 +236,12 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { } createCatalogOptions := &catalogmanagementv1.CreateCatalogOptions{ - ID: &catalogIDLink, - Rev: &catalogRevLink, Label: core.StringPtr("testString"), LabelI18n: make(map[string]string), ShortDescription: core.StringPtr("testString"), ShortDescriptionI18n: make(map[string]string), CatalogIconURL: core.StringPtr("testString"), + CatalogBannerURL: core.StringPtr("testString"), Tags: []string{"testString"}, Features: []catalogmanagementv1.Feature{*featureModel}, Disabled: core.BoolPtr(true), @@ -354,6 +353,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { ShortDescription: core.StringPtr("testString"), ShortDescriptionI18n: make(map[string]string), CatalogIconURL: core.StringPtr("testString"), + CatalogBannerURL: core.StringPtr("testString"), Tags: []string{"testString"}, Features: []catalogmanagementv1.Feature{*featureModel}, Disabled: core.BoolPtr(true), @@ -507,7 +507,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { APIURL: core.StringPtr("testString"), Caption: core.StringPtr("testString"), CaptionI18n: make(map[string]string), - Type: core.StringPtr("testString"), + Type: core.StringPtr("image/svg+xml"), ThumbnailURL: core.StringPtr("testString"), } @@ -537,7 +537,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { costBreakdownModel := &catalogmanagementv1.CostBreakdown{ TotalHourlyCost: core.StringPtr("testString"), - TotalMonthlyCOst: core.StringPtr("testString"), + TotalMonthlyCost: core.StringPtr("testString"), Resources: []catalogmanagementv1.CostResource{*costResourceModel}, } @@ -574,7 +574,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { TimeGenerated: CreateMockDateTime("2019-01-01T12:00:00.000Z"), } - dependencyModel := &catalogmanagementv1.Dependency{ + dependencyModel := &catalogmanagementv1.OfferingReference{ CatalogID: core.StringPtr("testString"), ID: core.StringPtr("testString"), Name: core.StringPtr("testString"), @@ -586,7 +586,36 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { ArchitectureDiagrams: []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel}, Features: []catalogmanagementv1.Feature{*featureModel}, CostEstimate: costEstimateModel, - Dependencies: []catalogmanagementv1.Dependency{*dependencyModel}, + Dependencies: []catalogmanagementv1.OfferingReference{*dependencyModel}, + } + + complianceControlSCCProfileModel := &catalogmanagementv1.ComplianceControlSccProfile{ + Type: core.StringPtr("testString"), + } + + complianceControlFamilyModel := &catalogmanagementv1.ComplianceControlFamily{ + ID: core.StringPtr("testString"), + ExternalID: core.StringPtr("testString"), + Description: core.StringPtr("testString"), + UIHref: core.StringPtr("testString"), + } + + goalModel := &catalogmanagementv1.Goal{ + ID: core.StringPtr("testString"), + Description: core.StringPtr("testString"), + UIHref: core.StringPtr("testString"), + } + + complianceControlValidationModel := &catalogmanagementv1.ComplianceControlValidation{ + Certified: core.BoolPtr(true), + Results: make(map[string]interface{}), + } + + complianceModel := &catalogmanagementv1.ComplianceControl{ + SccProfile: complianceControlSCCProfileModel, + Family: complianceControlFamilyModel, + Goals: []catalogmanagementv1.Goal{*goalModel}, + Validation: complianceControlValidationModel, } versionModel := &catalogmanagementv1.Version{ @@ -626,6 +655,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { DeprecatePending: deprecatePendingModel, SolutionInfo: solutionInfoModel, IsConsumable: core.BoolPtr(true), + Compliance: []catalogmanagementv1.ComplianceControl{*complianceModel}, } deploymentModel := &catalogmanagementv1.Deployment{ @@ -738,8 +768,6 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { createOfferingOptions := &catalogmanagementv1.CreateOfferingOptions{ CatalogIdentifier: &catalogIDLink, - ID: &offeringIDLink, - Rev: &offeringRevLink, URL: core.StringPtr("testString"), CRN: core.StringPtr("testString"), Label: core.StringPtr("testString"), @@ -1111,7 +1139,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { APIURL: core.StringPtr("testString"), Caption: core.StringPtr("testString"), CaptionI18n: make(map[string]string), - Type: core.StringPtr("testString"), + Type: core.StringPtr("image/svg+xml"), ThumbnailURL: core.StringPtr("testString"), } @@ -1141,7 +1169,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { costBreakdownModel := &catalogmanagementv1.CostBreakdown{ TotalHourlyCost: core.StringPtr("testString"), - TotalMonthlyCOst: core.StringPtr("testString"), + TotalMonthlyCost: core.StringPtr("testString"), Resources: []catalogmanagementv1.CostResource{*costResourceModel}, } @@ -1178,7 +1206,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { TimeGenerated: CreateMockDateTime("2019-01-01T12:00:00.000Z"), } - dependencyModel := &catalogmanagementv1.Dependency{ + dependencyModel := &catalogmanagementv1.OfferingReference{ CatalogID: core.StringPtr("testString"), ID: core.StringPtr("testString"), Name: core.StringPtr("testString"), @@ -1190,7 +1218,36 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { ArchitectureDiagrams: []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel}, Features: []catalogmanagementv1.Feature{*featureModel}, CostEstimate: costEstimateModel, - Dependencies: []catalogmanagementv1.Dependency{*dependencyModel}, + Dependencies: []catalogmanagementv1.OfferingReference{*dependencyModel}, + } + + complianceControlSCCProfileModel := &catalogmanagementv1.ComplianceControlSccProfile{ + Type: core.StringPtr("testString"), + } + + complianceControlFamilyModel := &catalogmanagementv1.ComplianceControlFamily{ + ID: core.StringPtr("testString"), + ExternalID: core.StringPtr("testString"), + Description: core.StringPtr("testString"), + UIHref: core.StringPtr("testString"), + } + + goalModel := &catalogmanagementv1.Goal{ + ID: core.StringPtr("testString"), + Description: core.StringPtr("testString"), + UIHref: core.StringPtr("testString"), + } + + complianceControlValidationModel := &catalogmanagementv1.ComplianceControlValidation{ + Certified: core.BoolPtr(true), + Results: make(map[string]interface{}), + } + + complianceModel := &catalogmanagementv1.ComplianceControl{ + SccProfile: complianceControlSCCProfileModel, + Family: complianceControlFamilyModel, + Goals: []catalogmanagementv1.Goal{*goalModel}, + Validation: complianceControlValidationModel, } versionModel := &catalogmanagementv1.Version{ @@ -1231,6 +1288,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { DeprecatePending: deprecatePendingModel, SolutionInfo: solutionInfoModel, IsConsumable: core.BoolPtr(true), + Compliance: []catalogmanagementv1.ComplianceControl{*complianceModel}, } deploymentModel := &catalogmanagementv1.Deployment{ @@ -2301,54 +2359,6 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { }) }) - Describe(`AccountPublishVersion - Publish version to account members`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`AccountPublishVersion(accountPublishVersionOptions *AccountPublishVersionOptions)`, func() { - Skip("Not testing") - accountPublishVersionOptions := &catalogmanagementv1.AccountPublishVersionOptions{ - VersionLocID: core.StringPtr(versionLocatorLink), - } - - response, err := catalogManagementService.AccountPublishVersion(accountPublishVersionOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - }) - - Describe(`IBMPublishVersion - Publish version to IBMers in public catalog`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`IBMPublishVersion(ibmPublishVersionOptions *IBMPublishVersionOptions)`, func() { - Skip("Not testing") - ibmPublishVersionOptions := &catalogmanagementv1.IBMPublishVersionOptions{ - VersionLocID: core.StringPtr(versionLocatorLink), - } - - response, err := catalogManagementService.IBMPublishVersion(ibmPublishVersionOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - }) - - Describe(`PublicPublishVersion - Publish version to all users in public catalog`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`PublicPublishVersion(publicPublishVersionOptions *PublicPublishVersionOptions)`, func() { - Skip("Not testing") - publicPublishVersionOptions := &catalogmanagementv1.PublicPublishVersionOptions{ - VersionLocID: core.StringPtr(versionLocatorLink), - } - - response, err := catalogManagementService.PublicPublishVersion(publicPublishVersionOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - }) - Describe(`GetCluster - Get kubernetes cluster`, func() { BeforeEach(func() { shouldSkipTest() @@ -3060,8 +3070,6 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { } createCatalogOptions := &catalogmanagementv1.CreateCatalogOptions{ - ID: &catalogIDLink, - Rev: &catalogRevLink, Label: core.StringPtr("testString"), LabelI18n: make(map[string]string), ShortDescription: core.StringPtr("testString"), @@ -3112,9 +3120,7 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { createObjectOptions := &catalogmanagementv1.CreateObjectOptions{ CatalogIdentifier: &catalogIDLink, - ID: &objectIDLink, Name: core.StringPtr("testString"), - Rev: &objectRevLink, CRN: core.StringPtr("testString"), URL: core.StringPtr("testString"), ParentID: core.StringPtr("us-south"), @@ -3389,23 +3395,6 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { }) }) - Describe(`CreateObjectAccess - Add account ID to object access list`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`CreateObjectAccess(createObjectAccessOptions *CreateObjectAccessOptions)`, func() { - createObjectAccessOptions := &catalogmanagementv1.CreateObjectAccessOptions{ - CatalogIdentifier: &catalogIDLink, - ObjectIdentifier: &objectIDLink, - AccessIdentifier: core.StringPtr(accountID), - } - - response, err := catalogManagementService.CreateObjectAccess(createObjectAccessOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(201)) - }) - }) - Describe(`GetObjectAccessList - Get object access list`, func() { BeforeEach(func() { shouldSkipTest() @@ -3530,74 +3519,6 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { }) }) - Describe(`AccountPublishObject - Publish object to account`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`AccountPublishObject(accountPublishObjectOptions *AccountPublishObjectOptions)`, func() { - Skip("Not testing") - accountPublishObjectOptions := &catalogmanagementv1.AccountPublishObjectOptions{ - CatalogIdentifier: &catalogIDLink, - ObjectIdentifier: &objectIDLink, - } - - response, err := catalogManagementService.AccountPublishObject(accountPublishObjectOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - }) - - Describe(`SharedPublishObject - Publish object to share with allow list`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`SharedPublishObject(sharedPublishObjectOptions *SharedPublishObjectOptions)`, func() { - Skip("Not testing") - sharedPublishObjectOptions := &catalogmanagementv1.SharedPublishObjectOptions{ - CatalogIdentifier: &catalogIDLink, - ObjectIdentifier: &objectIDLink, - } - - response, err := catalogManagementService.SharedPublishObject(sharedPublishObjectOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - }) - - Describe(`IBMPublishObject - Publish object to share with IBMers`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`IBMPublishObject(ibmPublishObjectOptions *IBMPublishObjectOptions)`, func() { - Skip("Not testing") - ibmPublishObjectOptions := &catalogmanagementv1.IBMPublishObjectOptions{ - CatalogIdentifier: &catalogIDLink, - ObjectIdentifier: &objectIDLink, - } - - response, err := catalogManagementService.IBMPublishObject(ibmPublishObjectOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - }) - - Describe(`PublicPublishObject - Publish object to share with all users`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`PublicPublishObject(publicPublishObjectOptions *PublicPublishObjectOptions)`, func() { - Skip("Not testing") - publicPublishObjectOptions := &catalogmanagementv1.PublicPublishObjectOptions{ - CatalogIdentifier: &catalogIDLink, - ObjectIdentifier: &objectIDLink, - } - - response, err := catalogManagementService.PublicPublishObject(publicPublishObjectOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(202)) - }) - }) - Describe(`DeleteObjectAccessList - Delete accesses from object access list`, func() { BeforeEach(func() { shouldSkipTest() @@ -3616,23 +3537,6 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() { }) }) - Describe(`DeleteObjectAccess - Remove account ID from object access list`, func() { - BeforeEach(func() { - shouldSkipTest() - }) - It(`DeleteObjectAccess(deleteObjectAccessOptions *DeleteObjectAccessOptions)`, func() { - deleteObjectAccessOptions := &catalogmanagementv1.DeleteObjectAccessOptions{ - CatalogIdentifier: &catalogIDLink, - ObjectIdentifier: &objectIDLink, - AccessIdentifier: core.StringPtr(accountID), - } - - response, err := catalogManagementService.DeleteObjectAccess(deleteObjectAccessOptions) - Expect(err).To(BeNil()) - Expect(response.StatusCode).To(Equal(200)) - }) - }) - Describe(`DeleteObject - Delete catalog object`, func() { BeforeEach(func() { shouldSkipTest() diff --git a/catalogmanagementv1/catalog_management_v1_suite_test.go b/catalogmanagementv1/catalog_management_v1_suite_test.go index a2a32ba7..b69dc752 100644 --- a/catalogmanagementv1/catalog_management_v1_suite_test.go +++ b/catalogmanagementv1/catalog_management_v1_suite_test.go @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/catalogmanagementv1/catalog_management_v1_test.go b/catalogmanagementv1/catalog_management_v1_test.go index dd502ff4..8d8df8d8 100644 --- a/catalogmanagementv1/catalog_management_v1_test.go +++ b/catalogmanagementv1/catalog_management_v1_test.go @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2022. + * (C) Copyright IBM Corp. 2023. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1524,7 +1524,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"total_count": 10, "resources": [{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count": 10, "resources": [{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}]}`) })) }) It(`Invoke ListCatalogs successfully with retries`, func() { @@ -1577,7 +1577,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"total_count": 10, "resources": [{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}]}`) + fmt.Fprintf(res, "%s", `{"total_count": 10, "resources": [{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}]}`) })) }) It(`Invoke ListCatalogs successfully`, func() { @@ -1744,13 +1744,12 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateCatalogOptions model createCatalogOptionsModel := new(catalogmanagementv1.CreateCatalogOptions) - createCatalogOptionsModel.ID = core.StringPtr("testString") - createCatalogOptionsModel.Rev = core.StringPtr("testString") createCatalogOptionsModel.Label = core.StringPtr("testString") createCatalogOptionsModel.LabelI18n = make(map[string]string) createCatalogOptionsModel.ShortDescription = core.StringPtr("testString") createCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) createCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + createCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") createCatalogOptionsModel.Tags = []string{"testString"} createCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} createCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -1759,7 +1758,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createCatalogOptionsModel.CatalogFilters = filtersModel createCatalogOptionsModel.SyndicationSettings = syndicationResourceModel createCatalogOptionsModel.Kind = core.StringPtr("testString") - createCatalogOptionsModel.Metadata = make(map[string]interface{}) + createCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := catalogManagementService.CreateCatalog(createCatalogOptionsModel) @@ -1812,7 +1811,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}`) })) }) It(`Invoke CreateCatalog successfully with retries`, func() { @@ -1882,13 +1881,12 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateCatalogOptions model createCatalogOptionsModel := new(catalogmanagementv1.CreateCatalogOptions) - createCatalogOptionsModel.ID = core.StringPtr("testString") - createCatalogOptionsModel.Rev = core.StringPtr("testString") createCatalogOptionsModel.Label = core.StringPtr("testString") createCatalogOptionsModel.LabelI18n = make(map[string]string) createCatalogOptionsModel.ShortDescription = core.StringPtr("testString") createCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) createCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + createCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") createCatalogOptionsModel.Tags = []string{"testString"} createCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} createCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -1897,7 +1895,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createCatalogOptionsModel.CatalogFilters = filtersModel createCatalogOptionsModel.SyndicationSettings = syndicationResourceModel createCatalogOptionsModel.Kind = core.StringPtr("testString") - createCatalogOptionsModel.Metadata = make(map[string]interface{}) + createCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -1953,7 +1951,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}`) })) }) It(`Invoke CreateCatalog successfully`, func() { @@ -2028,13 +2026,12 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateCatalogOptions model createCatalogOptionsModel := new(catalogmanagementv1.CreateCatalogOptions) - createCatalogOptionsModel.ID = core.StringPtr("testString") - createCatalogOptionsModel.Rev = core.StringPtr("testString") createCatalogOptionsModel.Label = core.StringPtr("testString") createCatalogOptionsModel.LabelI18n = make(map[string]string) createCatalogOptionsModel.ShortDescription = core.StringPtr("testString") createCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) createCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + createCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") createCatalogOptionsModel.Tags = []string{"testString"} createCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} createCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -2043,7 +2040,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createCatalogOptionsModel.CatalogFilters = filtersModel createCatalogOptionsModel.SyndicationSettings = syndicationResourceModel createCatalogOptionsModel.Kind = core.StringPtr("testString") - createCatalogOptionsModel.Metadata = make(map[string]interface{}) + createCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -2119,13 +2116,12 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateCatalogOptions model createCatalogOptionsModel := new(catalogmanagementv1.CreateCatalogOptions) - createCatalogOptionsModel.ID = core.StringPtr("testString") - createCatalogOptionsModel.Rev = core.StringPtr("testString") createCatalogOptionsModel.Label = core.StringPtr("testString") createCatalogOptionsModel.LabelI18n = make(map[string]string) createCatalogOptionsModel.ShortDescription = core.StringPtr("testString") createCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) createCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + createCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") createCatalogOptionsModel.Tags = []string{"testString"} createCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} createCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -2134,7 +2130,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createCatalogOptionsModel.CatalogFilters = filtersModel createCatalogOptionsModel.SyndicationSettings = syndicationResourceModel createCatalogOptionsModel.Kind = core.StringPtr("testString") - createCatalogOptionsModel.Metadata = make(map[string]interface{}) + createCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := catalogManagementService.SetServiceURL("") @@ -2224,13 +2220,12 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateCatalogOptions model createCatalogOptionsModel := new(catalogmanagementv1.CreateCatalogOptions) - createCatalogOptionsModel.ID = core.StringPtr("testString") - createCatalogOptionsModel.Rev = core.StringPtr("testString") createCatalogOptionsModel.Label = core.StringPtr("testString") createCatalogOptionsModel.LabelI18n = make(map[string]string) createCatalogOptionsModel.ShortDescription = core.StringPtr("testString") createCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) createCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + createCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") createCatalogOptionsModel.Tags = []string{"testString"} createCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} createCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -2239,7 +2234,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createCatalogOptionsModel.CatalogFilters = filtersModel createCatalogOptionsModel.SyndicationSettings = syndicationResourceModel createCatalogOptionsModel.Kind = core.StringPtr("testString") - createCatalogOptionsModel.Metadata = make(map[string]interface{}) + createCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -2317,7 +2312,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}`) })) }) It(`Invoke GetCatalog successfully with retries`, func() { @@ -2371,7 +2366,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}`) })) }) It(`Invoke GetCatalog successfully`, func() { @@ -2556,6 +2551,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.ShortDescription = core.StringPtr("testString") replaceCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) replaceCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + replaceCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") replaceCatalogOptionsModel.Tags = []string{"testString"} replaceCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} replaceCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -2564,7 +2560,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.CatalogFilters = filtersModel replaceCatalogOptionsModel.SyndicationSettings = syndicationResourceModel replaceCatalogOptionsModel.Kind = core.StringPtr("testString") - replaceCatalogOptionsModel.Metadata = make(map[string]interface{}) + replaceCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := catalogManagementService.ReplaceCatalog(replaceCatalogOptionsModel) @@ -2617,7 +2613,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}`) })) }) It(`Invoke ReplaceCatalog successfully with retries`, func() { @@ -2695,6 +2691,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.ShortDescription = core.StringPtr("testString") replaceCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) replaceCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + replaceCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") replaceCatalogOptionsModel.Tags = []string{"testString"} replaceCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} replaceCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -2703,7 +2700,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.CatalogFilters = filtersModel replaceCatalogOptionsModel.SyndicationSettings = syndicationResourceModel replaceCatalogOptionsModel.Kind = core.StringPtr("testString") - replaceCatalogOptionsModel.Metadata = make(map[string]interface{}) + replaceCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -2759,7 +2756,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "catalog_icon_url": "CatalogIconURL", "catalog_banner_url": "CatalogBannerURL", "tags": ["Tags"], "url": "URL", "crn": "CRN", "offerings_url": "OfferingsURL", "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "disabled": true, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "resource_group_id": "ResourceGroupID", "owning_account": "OwningAccount", "catalog_filters": {"include_all": true, "category_filters": {"mapKey": {"include": false, "filter": {"filter_terms": ["FilterTerms"]}}}, "id_filters": {"include": {"filter_terms": ["FilterTerms"]}, "exclude": {"filter_terms": ["FilterTerms"]}}}, "syndication_settings": {"remove_related_components": false, "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "history": {"namespaces": ["Namespaces"], "clusters": [{"region": "Region", "id": "ID", "name": "Name", "resource_group_name": "ResourceGroupName", "type": "Type", "namespaces": ["Namespaces"], "all_namespaces": false}], "last_run": "2019-01-01T12:00:00.000Z"}, "authorization": {"token": "Token", "last_run": "2019-01-01T12:00:00.000Z"}}, "kind": "Kind", "metadata": {"anyKey": "anyValue"}}`) })) }) It(`Invoke ReplaceCatalog successfully`, func() { @@ -2842,6 +2839,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.ShortDescription = core.StringPtr("testString") replaceCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) replaceCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + replaceCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") replaceCatalogOptionsModel.Tags = []string{"testString"} replaceCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} replaceCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -2850,7 +2848,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.CatalogFilters = filtersModel replaceCatalogOptionsModel.SyndicationSettings = syndicationResourceModel replaceCatalogOptionsModel.Kind = core.StringPtr("testString") - replaceCatalogOptionsModel.Metadata = make(map[string]interface{}) + replaceCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -2934,6 +2932,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.ShortDescription = core.StringPtr("testString") replaceCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) replaceCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + replaceCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") replaceCatalogOptionsModel.Tags = []string{"testString"} replaceCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} replaceCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -2942,7 +2941,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.CatalogFilters = filtersModel replaceCatalogOptionsModel.SyndicationSettings = syndicationResourceModel replaceCatalogOptionsModel.Kind = core.StringPtr("testString") - replaceCatalogOptionsModel.Metadata = make(map[string]interface{}) + replaceCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := catalogManagementService.SetServiceURL("") @@ -3047,6 +3046,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.ShortDescription = core.StringPtr("testString") replaceCatalogOptionsModel.ShortDescriptionI18n = make(map[string]string) replaceCatalogOptionsModel.CatalogIconURL = core.StringPtr("testString") + replaceCatalogOptionsModel.CatalogBannerURL = core.StringPtr("testString") replaceCatalogOptionsModel.Tags = []string{"testString"} replaceCatalogOptionsModel.Features = []catalogmanagementv1.Feature{*featureModel} replaceCatalogOptionsModel.Disabled = core.BoolPtr(true) @@ -3055,7 +3055,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.CatalogFilters = filtersModel replaceCatalogOptionsModel.SyndicationSettings = syndicationResourceModel replaceCatalogOptionsModel.Kind = core.StringPtr("testString") - replaceCatalogOptionsModel.Metadata = make(map[string]interface{}) + replaceCatalogOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceCatalogOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -4261,7 +4261,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.Query()["catalog"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["select"]).To(Equal([]string{"all"})) // TODO: Add check for includeHidden query parameter - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -4282,7 +4282,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getConsumptionOfferingsOptionsModel.Catalog = core.StringPtr("testString") getConsumptionOfferingsOptionsModel.Select = core.StringPtr("all") getConsumptionOfferingsOptionsModel.IncludeHidden = core.BoolPtr(true) - getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) getConsumptionOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) getConsumptionOfferingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response @@ -4318,7 +4318,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.Query()["catalog"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["select"]).To(Equal([]string{"all"})) // TODO: Add check for includeHidden query parameter - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -4326,7 +4326,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) })) }) It(`Invoke GetConsumptionOfferings successfully with retries`, func() { @@ -4344,7 +4344,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getConsumptionOfferingsOptionsModel.Catalog = core.StringPtr("testString") getConsumptionOfferingsOptionsModel.Select = core.StringPtr("all") getConsumptionOfferingsOptionsModel.IncludeHidden = core.BoolPtr(true) - getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) getConsumptionOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) getConsumptionOfferingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -4386,12 +4386,12 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.Query()["catalog"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["select"]).To(Equal([]string{"all"})) // TODO: Add check for includeHidden query parameter - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) })) }) It(`Invoke GetConsumptionOfferings successfully`, func() { @@ -4414,7 +4414,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getConsumptionOfferingsOptionsModel.Catalog = core.StringPtr("testString") getConsumptionOfferingsOptionsModel.Select = core.StringPtr("all") getConsumptionOfferingsOptionsModel.IncludeHidden = core.BoolPtr(true) - getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) getConsumptionOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) getConsumptionOfferingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -4439,7 +4439,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getConsumptionOfferingsOptionsModel.Catalog = core.StringPtr("testString") getConsumptionOfferingsOptionsModel.Select = core.StringPtr("all") getConsumptionOfferingsOptionsModel.IncludeHidden = core.BoolPtr(true) - getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) getConsumptionOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) getConsumptionOfferingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) @@ -4478,7 +4478,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getConsumptionOfferingsOptionsModel.Catalog = core.StringPtr("testString") getConsumptionOfferingsOptionsModel.Select = core.StringPtr("all") getConsumptionOfferingsOptionsModel.IncludeHidden = core.BoolPtr(true) - getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getConsumptionOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) getConsumptionOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) getConsumptionOfferingsOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -4494,6 +4494,117 @@ var _ = Describe(`CatalogManagementV1`, func() { testServer.Close() }) }) + Context(`Test pagination helper method on response`, func() { + It(`Invoke GetNextOffset successfully`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=135") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(Equal(core.Int64Ptr(int64(135)))) + }) + It(`Invoke GetNextOffset without a "Next" property in the response`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset without any query params in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + responseObject.Next = core.StringPtr("ibm.com") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset with a non-integer query param in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=tiger") + + value, err := responseObject.GetNextOffset() + Expect(err).NotTo(BeNil()) + Expect(value).To(BeNil()) + }) + }) + Context(`Using mock server endpoint - paginated response`, func() { + BeforeEach(func() { + var requestNumber int = 0 + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(getConsumptionOfferingsPath)) + Expect(req.Method).To(Equal("GET")) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + requestNumber++ + if requestNumber == 1 { + fmt.Fprintf(res, "%s", `{"next":"https://myhost.com/somePath?offset=1","total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","url":"URL","crn":"CRN","label":"Label","label_i18n":{"mapKey":"Inner"},"name":"Name","offering_icon_url":"OfferingIconURL","offering_docs_url":"OfferingDocsURL","offering_support_url":"OfferingSupportURL","tags":["Tags"],"keywords":["Keywords"],"rating":{"one_star_count":12,"two_star_count":12,"three_star_count":14,"four_star_count":13},"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"kinds":[{"id":"ID","format_kind":"FormatKind","install_kind":"InstallKind","target_kind":"TargetKind","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","versions":[{"id":"ID","_rev":"Rev","crn":"CRN","version":"Version","flavor":{"name":"Name","label":"Label","label_i18n":{"mapKey":"Inner"},"index":5},"sha":"Sha","created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","offering_id":"OfferingID","catalog_id":"CatalogID","kind_id":"KindID","tags":["Tags"],"repo_url":"RepoURL","source_url":"SourceURL","tgz_url":"TgzURL","configuration":[{"key":"Key","type":"Type","default_value":"anyValue","display_name":"DisplayName","value_constraint":"ValueConstraint","description":"Description","required":true,"options":["anyValue"],"hidden":true,"custom_config":{"type":"Type","grouping":"Grouping","original_grouping":"OriginalGrouping","grouping_index":13,"config_constraints":{"anyKey":"anyValue"},"associations":{"parameters":[{"name":"Name","optionsRefresh":true}]}},"type_metadata":"TypeMetadata"}],"outputs":[{"key":"Key","description":"Description"}],"iam_permissions":[{"service_name":"ServiceName","role_crns":["RoleCrns"],"resources":[{"name":"Name","description":"Description","role_crns":["RoleCrns"]}]}],"metadata":{"anyKey":"anyValue"},"validation":{"validated":"2019-01-01T12:00:00.000Z","requested":"2019-01-01T12:00:00.000Z","state":"State","last_operation":"LastOperation","target":{"anyKey":"anyValue"},"message":"Message"},"required_resources":[{"type":"mem","value":"anyValue"}],"single_instance":true,"install":{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"},"pre_install":[{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"}],"entitlement":{"provider_name":"ProviderName","provider_id":"ProviderID","product_id":"ProductID","part_numbers":["PartNumbers"],"image_repo_name":"ImageRepoName"},"licenses":[{"id":"ID","name":"Name","type":"Type","url":"URL","description":"Description"}],"image_manifest_url":"ImageManifestURL","deprecated":true,"package_version":"PackageVersion","state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"version_locator":"VersionLocator","long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"whitelisted_accounts":["WhitelistedAccounts"],"image_pull_key_name":"ImagePullKeyName","deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"solution_info":{"architecture_diagrams":[{"diagram":{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"cost_estimate":{"version":"Version","currency":"Currency","projects":[{"name":"Name","metadata":{"anyKey":"anyValue"},"pastBreakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"breakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"diff":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}}}],"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}},"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","pastTotalHourlyCost":"PastTotalHourlyCost","pastTotalMonthlyCost":"PastTotalMonthlyCost","diffTotalHourlyCost":"DiffTotalHourlyCost","diffTotalMonthlyCost":"DiffTotalMonthlyCost","timeGenerated":"2019-01-01T12:00:00.000Z"},"dependencies":[{"catalog_id":"CatalogID","id":"ID","name":"Name","kind":"Kind","version":"Version","flavors":["Flavors"]}]},"is_consumable":true,"compliance":[{"scc_profile":{"type":"Type"},"family":{"id":"ID","external_id":"ExternalID","description":"Description","ui_href":"UIHref"},"goals":[{"id":"ID","description":"Description","ui_href":"UIHref"}],"validation":{"certified":false,"results":{"anyKey":"anyValue"}}}]}],"plans":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","deployments":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z"}]}]}],"pc_managed":false,"publish_approved":false,"share_with_all":true,"share_with_ibm":true,"share_enabled":true,"permit_request_ibm_public_publish":false,"ibm_publish_approved":true,"public_publish_approved":false,"public_original_crn":"PublicOriginalCRN","publish_public_crn":"PublishPublicCRN","portal_approval_record":"PortalApprovalRecord","portal_ui_url":"PortalUIURL","catalog_id":"CatalogID","catalog_name":"CatalogName","metadata":{"anyKey":"anyValue"},"disclaimer":"Disclaimer","hidden":true,"provider":"Provider","provider_info":{"id":"ID","name":"Name"},"repo_info":{"token":"Token","type":"Type"},"image_pull_keys":[{"name":"Name","value":"Value","description":"Description"}],"support":{"url":"URL","process":"Process","process_i18n":{"mapKey":"Inner"},"locations":["Locations"],"support_details":[{"type":"Type","contact":"Contact","response_wait_time":{"value":5,"type":"Type"},"availability":{"times":[{"day":3,"start_time":"StartTime","end_time":"EndTime"}],"timezone":"Timezone","always_available":false}}],"support_escalation":{"escalation_wait_time":{"value":5,"type":"Type"},"response_wait_time":{"value":5,"type":"Type"},"contact":"Contact"},"support_type":"SupportType"},"media":[{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"}],"deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"product_kind":"ProductKind","badges":[{"id":"ID","label":"Label","label_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"},"icon":"Icon","authority":"Authority","tag":"Tag","learn_more_links":{"first_party":"FirstParty","third_party":"ThirdParty"},"constraints":[{"type":"Type","rule":"anyValue"}]}]}]}`) + } else if requestNumber == 2 { + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","url":"URL","crn":"CRN","label":"Label","label_i18n":{"mapKey":"Inner"},"name":"Name","offering_icon_url":"OfferingIconURL","offering_docs_url":"OfferingDocsURL","offering_support_url":"OfferingSupportURL","tags":["Tags"],"keywords":["Keywords"],"rating":{"one_star_count":12,"two_star_count":12,"three_star_count":14,"four_star_count":13},"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"kinds":[{"id":"ID","format_kind":"FormatKind","install_kind":"InstallKind","target_kind":"TargetKind","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","versions":[{"id":"ID","_rev":"Rev","crn":"CRN","version":"Version","flavor":{"name":"Name","label":"Label","label_i18n":{"mapKey":"Inner"},"index":5},"sha":"Sha","created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","offering_id":"OfferingID","catalog_id":"CatalogID","kind_id":"KindID","tags":["Tags"],"repo_url":"RepoURL","source_url":"SourceURL","tgz_url":"TgzURL","configuration":[{"key":"Key","type":"Type","default_value":"anyValue","display_name":"DisplayName","value_constraint":"ValueConstraint","description":"Description","required":true,"options":["anyValue"],"hidden":true,"custom_config":{"type":"Type","grouping":"Grouping","original_grouping":"OriginalGrouping","grouping_index":13,"config_constraints":{"anyKey":"anyValue"},"associations":{"parameters":[{"name":"Name","optionsRefresh":true}]}},"type_metadata":"TypeMetadata"}],"outputs":[{"key":"Key","description":"Description"}],"iam_permissions":[{"service_name":"ServiceName","role_crns":["RoleCrns"],"resources":[{"name":"Name","description":"Description","role_crns":["RoleCrns"]}]}],"metadata":{"anyKey":"anyValue"},"validation":{"validated":"2019-01-01T12:00:00.000Z","requested":"2019-01-01T12:00:00.000Z","state":"State","last_operation":"LastOperation","target":{"anyKey":"anyValue"},"message":"Message"},"required_resources":[{"type":"mem","value":"anyValue"}],"single_instance":true,"install":{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"},"pre_install":[{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"}],"entitlement":{"provider_name":"ProviderName","provider_id":"ProviderID","product_id":"ProductID","part_numbers":["PartNumbers"],"image_repo_name":"ImageRepoName"},"licenses":[{"id":"ID","name":"Name","type":"Type","url":"URL","description":"Description"}],"image_manifest_url":"ImageManifestURL","deprecated":true,"package_version":"PackageVersion","state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"version_locator":"VersionLocator","long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"whitelisted_accounts":["WhitelistedAccounts"],"image_pull_key_name":"ImagePullKeyName","deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"solution_info":{"architecture_diagrams":[{"diagram":{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"cost_estimate":{"version":"Version","currency":"Currency","projects":[{"name":"Name","metadata":{"anyKey":"anyValue"},"pastBreakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"breakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"diff":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}}}],"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}},"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","pastTotalHourlyCost":"PastTotalHourlyCost","pastTotalMonthlyCost":"PastTotalMonthlyCost","diffTotalHourlyCost":"DiffTotalHourlyCost","diffTotalMonthlyCost":"DiffTotalMonthlyCost","timeGenerated":"2019-01-01T12:00:00.000Z"},"dependencies":[{"catalog_id":"CatalogID","id":"ID","name":"Name","kind":"Kind","version":"Version","flavors":["Flavors"]}]},"is_consumable":true,"compliance":[{"scc_profile":{"type":"Type"},"family":{"id":"ID","external_id":"ExternalID","description":"Description","ui_href":"UIHref"},"goals":[{"id":"ID","description":"Description","ui_href":"UIHref"}],"validation":{"certified":false,"results":{"anyKey":"anyValue"}}}]}],"plans":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","deployments":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z"}]}]}],"pc_managed":false,"publish_approved":false,"share_with_all":true,"share_with_ibm":true,"share_enabled":true,"permit_request_ibm_public_publish":false,"ibm_publish_approved":true,"public_publish_approved":false,"public_original_crn":"PublicOriginalCRN","publish_public_crn":"PublishPublicCRN","portal_approval_record":"PortalApprovalRecord","portal_ui_url":"PortalUIURL","catalog_id":"CatalogID","catalog_name":"CatalogName","metadata":{"anyKey":"anyValue"},"disclaimer":"Disclaimer","hidden":true,"provider":"Provider","provider_info":{"id":"ID","name":"Name"},"repo_info":{"token":"Token","type":"Type"},"image_pull_keys":[{"name":"Name","value":"Value","description":"Description"}],"support":{"url":"URL","process":"Process","process_i18n":{"mapKey":"Inner"},"locations":["Locations"],"support_details":[{"type":"Type","contact":"Contact","response_wait_time":{"value":5,"type":"Type"},"availability":{"times":[{"day":3,"start_time":"StartTime","end_time":"EndTime"}],"timezone":"Timezone","always_available":false}}],"support_escalation":{"escalation_wait_time":{"value":5,"type":"Type"},"response_wait_time":{"value":5,"type":"Type"},"contact":"Contact"},"support_type":"SupportType"},"media":[{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"}],"deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"product_kind":"ProductKind","badges":[{"id":"ID","label":"Label","label_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"},"icon":"Icon","authority":"Authority","tag":"Tag","learn_more_links":{"first_party":"FirstParty","third_party":"ThirdParty"},"constraints":[{"type":"Type","rule":"anyValue"}]}]}]}`) + } else { + res.WriteHeader(400) + } + })) + }) + It(`Use GetConsumptionOfferingsPager.GetNext successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + getConsumptionOfferingsOptionsModel := &catalogmanagementv1.GetConsumptionOfferingsOptions{ + Digest: core.BoolPtr(true), + Catalog: core.StringPtr("testString"), + Select: core.StringPtr("all"), + IncludeHidden: core.BoolPtr(true), + Limit: core.Int64Ptr(int64(10)), + } + + pager, err := catalogManagementService.NewGetConsumptionOfferingsPager(getConsumptionOfferingsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + var allResults []catalogmanagementv1.Offering + for pager.HasNext() { + nextPage, err := pager.GetNext() + Expect(err).To(BeNil()) + Expect(nextPage).ToNot(BeNil()) + allResults = append(allResults, nextPage...) + } + Expect(len(allResults)).To(Equal(2)) + }) + It(`Use GetConsumptionOfferingsPager.GetAll successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + getConsumptionOfferingsOptionsModel := &catalogmanagementv1.GetConsumptionOfferingsOptions{ + Digest: core.BoolPtr(true), + Catalog: core.StringPtr("testString"), + Select: core.StringPtr("all"), + IncludeHidden: core.BoolPtr(true), + Limit: core.Int64Ptr(int64(10)), + } + + pager, err := catalogManagementService.NewGetConsumptionOfferingsPager(getConsumptionOfferingsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + allResults, err := pager.GetAll() + Expect(err).To(BeNil()) + Expect(allResults).ToNot(BeNil()) + Expect(len(allResults)).To(Equal(2)) + }) + }) }) Describe(`ListOfferings(listOfferingsOptions *ListOfferingsOptions) - Operation response error`, func() { listOfferingsPath := "/catalogs/testString/offerings" @@ -4506,7 +4617,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listOfferingsPath)) Expect(req.Method).To(Equal("GET")) // TODO: Add check for digest query parameter - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"testString"})) @@ -4528,7 +4639,7 @@ var _ = Describe(`CatalogManagementV1`, func() { listOfferingsOptionsModel := new(catalogmanagementv1.ListOfferingsOptions) listOfferingsOptionsModel.CatalogIdentifier = core.StringPtr("testString") listOfferingsOptionsModel.Digest = core.BoolPtr(true) - listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) listOfferingsOptionsModel.Name = core.StringPtr("testString") listOfferingsOptionsModel.Sort = core.StringPtr("testString") @@ -4564,7 +4675,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.Method).To(Equal("GET")) // TODO: Add check for digest query parameter - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"testString"})) @@ -4575,7 +4686,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) })) }) It(`Invoke ListOfferings successfully with retries`, func() { @@ -4591,7 +4702,7 @@ var _ = Describe(`CatalogManagementV1`, func() { listOfferingsOptionsModel := new(catalogmanagementv1.ListOfferingsOptions) listOfferingsOptionsModel.CatalogIdentifier = core.StringPtr("testString") listOfferingsOptionsModel.Digest = core.BoolPtr(true) - listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) listOfferingsOptionsModel.Name = core.StringPtr("testString") listOfferingsOptionsModel.Sort = core.StringPtr("testString") @@ -4633,7 +4744,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.Method).To(Equal("GET")) // TODO: Add check for digest query parameter - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"testString"})) @@ -4641,7 +4752,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}]}`) })) }) It(`Invoke ListOfferings successfully`, func() { @@ -4662,7 +4773,7 @@ var _ = Describe(`CatalogManagementV1`, func() { listOfferingsOptionsModel := new(catalogmanagementv1.ListOfferingsOptions) listOfferingsOptionsModel.CatalogIdentifier = core.StringPtr("testString") listOfferingsOptionsModel.Digest = core.BoolPtr(true) - listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) listOfferingsOptionsModel.Name = core.StringPtr("testString") listOfferingsOptionsModel.Sort = core.StringPtr("testString") @@ -4688,7 +4799,7 @@ var _ = Describe(`CatalogManagementV1`, func() { listOfferingsOptionsModel := new(catalogmanagementv1.ListOfferingsOptions) listOfferingsOptionsModel.CatalogIdentifier = core.StringPtr("testString") listOfferingsOptionsModel.Digest = core.BoolPtr(true) - listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) listOfferingsOptionsModel.Name = core.StringPtr("testString") listOfferingsOptionsModel.Sort = core.StringPtr("testString") @@ -4735,7 +4846,7 @@ var _ = Describe(`CatalogManagementV1`, func() { listOfferingsOptionsModel := new(catalogmanagementv1.ListOfferingsOptions) listOfferingsOptionsModel.CatalogIdentifier = core.StringPtr("testString") listOfferingsOptionsModel.Digest = core.BoolPtr(true) - listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listOfferingsOptionsModel.Limit = core.Int64Ptr(int64(10)) listOfferingsOptionsModel.Offset = core.Int64Ptr(int64(38)) listOfferingsOptionsModel.Name = core.StringPtr("testString") listOfferingsOptionsModel.Sort = core.StringPtr("testString") @@ -4754,6 +4865,119 @@ var _ = Describe(`CatalogManagementV1`, func() { testServer.Close() }) }) + Context(`Test pagination helper method on response`, func() { + It(`Invoke GetNextOffset successfully`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=135") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(Equal(core.Int64Ptr(int64(135)))) + }) + It(`Invoke GetNextOffset without a "Next" property in the response`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset without any query params in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + responseObject.Next = core.StringPtr("ibm.com") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset with a non-integer query param in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.OfferingSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=tiger") + + value, err := responseObject.GetNextOffset() + Expect(err).NotTo(BeNil()) + Expect(value).To(BeNil()) + }) + }) + Context(`Using mock server endpoint - paginated response`, func() { + BeforeEach(func() { + var requestNumber int = 0 + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(listOfferingsPath)) + Expect(req.Method).To(Equal("GET")) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + requestNumber++ + if requestNumber == 1 { + fmt.Fprintf(res, "%s", `{"next":"https://myhost.com/somePath?offset=1","total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","url":"URL","crn":"CRN","label":"Label","label_i18n":{"mapKey":"Inner"},"name":"Name","offering_icon_url":"OfferingIconURL","offering_docs_url":"OfferingDocsURL","offering_support_url":"OfferingSupportURL","tags":["Tags"],"keywords":["Keywords"],"rating":{"one_star_count":12,"two_star_count":12,"three_star_count":14,"four_star_count":13},"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"kinds":[{"id":"ID","format_kind":"FormatKind","install_kind":"InstallKind","target_kind":"TargetKind","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","versions":[{"id":"ID","_rev":"Rev","crn":"CRN","version":"Version","flavor":{"name":"Name","label":"Label","label_i18n":{"mapKey":"Inner"},"index":5},"sha":"Sha","created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","offering_id":"OfferingID","catalog_id":"CatalogID","kind_id":"KindID","tags":["Tags"],"repo_url":"RepoURL","source_url":"SourceURL","tgz_url":"TgzURL","configuration":[{"key":"Key","type":"Type","default_value":"anyValue","display_name":"DisplayName","value_constraint":"ValueConstraint","description":"Description","required":true,"options":["anyValue"],"hidden":true,"custom_config":{"type":"Type","grouping":"Grouping","original_grouping":"OriginalGrouping","grouping_index":13,"config_constraints":{"anyKey":"anyValue"},"associations":{"parameters":[{"name":"Name","optionsRefresh":true}]}},"type_metadata":"TypeMetadata"}],"outputs":[{"key":"Key","description":"Description"}],"iam_permissions":[{"service_name":"ServiceName","role_crns":["RoleCrns"],"resources":[{"name":"Name","description":"Description","role_crns":["RoleCrns"]}]}],"metadata":{"anyKey":"anyValue"},"validation":{"validated":"2019-01-01T12:00:00.000Z","requested":"2019-01-01T12:00:00.000Z","state":"State","last_operation":"LastOperation","target":{"anyKey":"anyValue"},"message":"Message"},"required_resources":[{"type":"mem","value":"anyValue"}],"single_instance":true,"install":{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"},"pre_install":[{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"}],"entitlement":{"provider_name":"ProviderName","provider_id":"ProviderID","product_id":"ProductID","part_numbers":["PartNumbers"],"image_repo_name":"ImageRepoName"},"licenses":[{"id":"ID","name":"Name","type":"Type","url":"URL","description":"Description"}],"image_manifest_url":"ImageManifestURL","deprecated":true,"package_version":"PackageVersion","state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"version_locator":"VersionLocator","long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"whitelisted_accounts":["WhitelistedAccounts"],"image_pull_key_name":"ImagePullKeyName","deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"solution_info":{"architecture_diagrams":[{"diagram":{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"cost_estimate":{"version":"Version","currency":"Currency","projects":[{"name":"Name","metadata":{"anyKey":"anyValue"},"pastBreakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"breakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"diff":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}}}],"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}},"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","pastTotalHourlyCost":"PastTotalHourlyCost","pastTotalMonthlyCost":"PastTotalMonthlyCost","diffTotalHourlyCost":"DiffTotalHourlyCost","diffTotalMonthlyCost":"DiffTotalMonthlyCost","timeGenerated":"2019-01-01T12:00:00.000Z"},"dependencies":[{"catalog_id":"CatalogID","id":"ID","name":"Name","kind":"Kind","version":"Version","flavors":["Flavors"]}]},"is_consumable":true,"compliance":[{"scc_profile":{"type":"Type"},"family":{"id":"ID","external_id":"ExternalID","description":"Description","ui_href":"UIHref"},"goals":[{"id":"ID","description":"Description","ui_href":"UIHref"}],"validation":{"certified":false,"results":{"anyKey":"anyValue"}}}]}],"plans":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","deployments":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z"}]}]}],"pc_managed":false,"publish_approved":false,"share_with_all":true,"share_with_ibm":true,"share_enabled":true,"permit_request_ibm_public_publish":false,"ibm_publish_approved":true,"public_publish_approved":false,"public_original_crn":"PublicOriginalCRN","publish_public_crn":"PublishPublicCRN","portal_approval_record":"PortalApprovalRecord","portal_ui_url":"PortalUIURL","catalog_id":"CatalogID","catalog_name":"CatalogName","metadata":{"anyKey":"anyValue"},"disclaimer":"Disclaimer","hidden":true,"provider":"Provider","provider_info":{"id":"ID","name":"Name"},"repo_info":{"token":"Token","type":"Type"},"image_pull_keys":[{"name":"Name","value":"Value","description":"Description"}],"support":{"url":"URL","process":"Process","process_i18n":{"mapKey":"Inner"},"locations":["Locations"],"support_details":[{"type":"Type","contact":"Contact","response_wait_time":{"value":5,"type":"Type"},"availability":{"times":[{"day":3,"start_time":"StartTime","end_time":"EndTime"}],"timezone":"Timezone","always_available":false}}],"support_escalation":{"escalation_wait_time":{"value":5,"type":"Type"},"response_wait_time":{"value":5,"type":"Type"},"contact":"Contact"},"support_type":"SupportType"},"media":[{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"}],"deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"product_kind":"ProductKind","badges":[{"id":"ID","label":"Label","label_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"},"icon":"Icon","authority":"Authority","tag":"Tag","learn_more_links":{"first_party":"FirstParty","third_party":"ThirdParty"},"constraints":[{"type":"Type","rule":"anyValue"}]}]}]}`) + } else if requestNumber == 2 { + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","url":"URL","crn":"CRN","label":"Label","label_i18n":{"mapKey":"Inner"},"name":"Name","offering_icon_url":"OfferingIconURL","offering_docs_url":"OfferingDocsURL","offering_support_url":"OfferingSupportURL","tags":["Tags"],"keywords":["Keywords"],"rating":{"one_star_count":12,"two_star_count":12,"three_star_count":14,"four_star_count":13},"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"kinds":[{"id":"ID","format_kind":"FormatKind","install_kind":"InstallKind","target_kind":"TargetKind","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","versions":[{"id":"ID","_rev":"Rev","crn":"CRN","version":"Version","flavor":{"name":"Name","label":"Label","label_i18n":{"mapKey":"Inner"},"index":5},"sha":"Sha","created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","offering_id":"OfferingID","catalog_id":"CatalogID","kind_id":"KindID","tags":["Tags"],"repo_url":"RepoURL","source_url":"SourceURL","tgz_url":"TgzURL","configuration":[{"key":"Key","type":"Type","default_value":"anyValue","display_name":"DisplayName","value_constraint":"ValueConstraint","description":"Description","required":true,"options":["anyValue"],"hidden":true,"custom_config":{"type":"Type","grouping":"Grouping","original_grouping":"OriginalGrouping","grouping_index":13,"config_constraints":{"anyKey":"anyValue"},"associations":{"parameters":[{"name":"Name","optionsRefresh":true}]}},"type_metadata":"TypeMetadata"}],"outputs":[{"key":"Key","description":"Description"}],"iam_permissions":[{"service_name":"ServiceName","role_crns":["RoleCrns"],"resources":[{"name":"Name","description":"Description","role_crns":["RoleCrns"]}]}],"metadata":{"anyKey":"anyValue"},"validation":{"validated":"2019-01-01T12:00:00.000Z","requested":"2019-01-01T12:00:00.000Z","state":"State","last_operation":"LastOperation","target":{"anyKey":"anyValue"},"message":"Message"},"required_resources":[{"type":"mem","value":"anyValue"}],"single_instance":true,"install":{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"},"pre_install":[{"instructions":"Instructions","instructions_i18n":{"mapKey":"Inner"},"script":"Script","script_permission":"ScriptPermission","delete_script":"DeleteScript","scope":"Scope"}],"entitlement":{"provider_name":"ProviderName","provider_id":"ProviderID","product_id":"ProductID","part_numbers":["PartNumbers"],"image_repo_name":"ImageRepoName"},"licenses":[{"id":"ID","name":"Name","type":"Type","url":"URL","description":"Description"}],"image_manifest_url":"ImageManifestURL","deprecated":true,"package_version":"PackageVersion","state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"version_locator":"VersionLocator","long_description":"LongDescription","long_description_i18n":{"mapKey":"Inner"},"whitelisted_accounts":["WhitelistedAccounts"],"image_pull_key_name":"ImagePullKeyName","deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"solution_info":{"architecture_diagrams":[{"diagram":{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"cost_estimate":{"version":"Version","currency":"Currency","projects":[{"name":"Name","metadata":{"anyKey":"anyValue"},"pastBreakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"breakdown":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"diff":{"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","resources":[{"name":"Name","metadata":{"anyKey":"anyValue"},"hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost","costComponents":[{"name":"Name","unit":"Unit","hourlyQuantity":"HourlyQuantity","monthlyQuantity":"MonthlyQuantity","price":"Price","hourlyCost":"HourlyCost","monthlyCost":"MonthlyCost"}]}]},"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}}}],"summary":{"totalDetectedResources":22,"totalSupportedResources":23,"totalUnsupportedResources":25,"totalUsageBasedResources":24,"totalNoPriceResources":21,"unsupportedResourceCounts":{"mapKey":5},"noPriceResourceCounts":{"mapKey":5}},"totalHourlyCost":"TotalHourlyCost","totalMonthlyCost":"TotalMonthlyCost","pastTotalHourlyCost":"PastTotalHourlyCost","pastTotalMonthlyCost":"PastTotalMonthlyCost","diffTotalHourlyCost":"DiffTotalHourlyCost","diffTotalMonthlyCost":"DiffTotalMonthlyCost","timeGenerated":"2019-01-01T12:00:00.000Z"},"dependencies":[{"catalog_id":"CatalogID","id":"ID","name":"Name","kind":"Kind","version":"Version","flavors":["Flavors"]}]},"is_consumable":true,"compliance":[{"scc_profile":{"type":"Type"},"family":{"id":"ID","external_id":"ExternalID","description":"Description","ui_href":"UIHref"},"goals":[{"id":"ID","description":"Description","ui_href":"UIHref"}],"validation":{"certified":false,"results":{"anyKey":"anyValue"}}}]}],"plans":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"additional_features":[{"title":"Title","title_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"}}],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","deployments":[{"id":"ID","label":"Label","name":"Name","short_description":"ShortDescription","long_description":"LongDescription","metadata":{"anyKey":"anyValue"},"tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z"}]}]}],"pc_managed":false,"publish_approved":false,"share_with_all":true,"share_with_ibm":true,"share_enabled":true,"permit_request_ibm_public_publish":false,"ibm_publish_approved":true,"public_publish_approved":false,"public_original_crn":"PublicOriginalCRN","publish_public_crn":"PublishPublicCRN","portal_approval_record":"PortalApprovalRecord","portal_ui_url":"PortalUIURL","catalog_id":"CatalogID","catalog_name":"CatalogName","metadata":{"anyKey":"anyValue"},"disclaimer":"Disclaimer","hidden":true,"provider":"Provider","provider_info":{"id":"ID","name":"Name"},"repo_info":{"token":"Token","type":"Type"},"image_pull_keys":[{"name":"Name","value":"Value","description":"Description"}],"support":{"url":"URL","process":"Process","process_i18n":{"mapKey":"Inner"},"locations":["Locations"],"support_details":[{"type":"Type","contact":"Contact","response_wait_time":{"value":5,"type":"Type"},"availability":{"times":[{"day":3,"start_time":"StartTime","end_time":"EndTime"}],"timezone":"Timezone","always_available":false}}],"support_escalation":{"escalation_wait_time":{"value":5,"type":"Type"},"response_wait_time":{"value":5,"type":"Type"},"contact":"Contact"},"support_type":"SupportType"},"media":[{"url":"URL","api_url":"APIURL","url_proxy":{"url":"URL","sha":"Sha"},"caption":"Caption","caption_i18n":{"mapKey":"Inner"},"type":"Type","thumbnail_url":"ThumbnailURL"}],"deprecate_pending":{"deprecate_date":"2019-01-01T12:00:00.000Z","deprecate_state":"DeprecateState","description":"Description"},"product_kind":"ProductKind","badges":[{"id":"ID","label":"Label","label_i18n":{"mapKey":"Inner"},"description":"Description","description_i18n":{"mapKey":"Inner"},"icon":"Icon","authority":"Authority","tag":"Tag","learn_more_links":{"first_party":"FirstParty","third_party":"ThirdParty"},"constraints":[{"type":"Type","rule":"anyValue"}]}]}]}`) + } else { + res.WriteHeader(400) + } + })) + }) + It(`Use OfferingsPager.GetNext successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + listOfferingsOptionsModel := &catalogmanagementv1.ListOfferingsOptions{ + CatalogIdentifier: core.StringPtr("testString"), + Digest: core.BoolPtr(true), + Limit: core.Int64Ptr(int64(10)), + Name: core.StringPtr("testString"), + Sort: core.StringPtr("testString"), + IncludeHidden: core.BoolPtr(true), + } + + pager, err := catalogManagementService.NewOfferingsPager(listOfferingsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + var allResults []catalogmanagementv1.Offering + for pager.HasNext() { + nextPage, err := pager.GetNext() + Expect(err).To(BeNil()) + Expect(nextPage).ToNot(BeNil()) + allResults = append(allResults, nextPage...) + } + Expect(len(allResults)).To(Equal(2)) + }) + It(`Use OfferingsPager.GetAll successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + listOfferingsOptionsModel := &catalogmanagementv1.ListOfferingsOptions{ + CatalogIdentifier: core.StringPtr("testString"), + Digest: core.BoolPtr(true), + Limit: core.Int64Ptr(int64(10)), + Name: core.StringPtr("testString"), + Sort: core.StringPtr("testString"), + IncludeHidden: core.BoolPtr(true), + } + + pager, err := catalogManagementService.NewOfferingsPager(listOfferingsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + allResults, err := pager.GetAll() + Expect(err).To(BeNil()) + Expect(allResults).ToNot(BeNil()) + Expect(len(allResults)).To(Equal(2)) + }) + }) }) Describe(`CreateOffering(createOfferingOptions *CreateOfferingOptions) - Operation response error`, func() { createOfferingPath := "/catalogs/testString/offerings" @@ -4854,7 +5078,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -4935,7 +5159,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -4943,7 +5167,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -4959,7 +5183,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -4979,25 +5203,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -5014,7 +5266,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -5034,6 +5286,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -5042,7 +5295,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -5054,7 +5307,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -5067,7 +5320,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -5157,8 +5410,6 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateOfferingOptions model createOfferingOptionsModel := new(catalogmanagementv1.CreateOfferingOptions) createOfferingOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createOfferingOptionsModel.ID = core.StringPtr("testString") - createOfferingOptionsModel.Rev = core.StringPtr("testString") createOfferingOptionsModel.URL = core.StringPtr("testString") createOfferingOptionsModel.CRN = core.StringPtr("testString") createOfferingOptionsModel.Label = core.StringPtr("testString") @@ -5192,7 +5443,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") createOfferingOptionsModel.CatalogID = core.StringPtr("testString") createOfferingOptionsModel.CatalogName = core.StringPtr("testString") - createOfferingOptionsModel.Metadata = make(map[string]interface{}) + createOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingOptionsModel.Disclaimer = core.StringPtr("testString") createOfferingOptionsModel.Hidden = core.BoolPtr(true) createOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -5256,7 +5507,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke CreateOffering successfully with retries`, func() { @@ -5344,7 +5595,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -5425,7 +5676,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -5433,7 +5684,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -5449,7 +5700,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -5469,25 +5720,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -5504,7 +5783,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -5524,6 +5803,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -5532,7 +5812,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -5544,7 +5824,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -5557,7 +5837,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -5647,8 +5927,6 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateOfferingOptions model createOfferingOptionsModel := new(catalogmanagementv1.CreateOfferingOptions) createOfferingOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createOfferingOptionsModel.ID = core.StringPtr("testString") - createOfferingOptionsModel.Rev = core.StringPtr("testString") createOfferingOptionsModel.URL = core.StringPtr("testString") createOfferingOptionsModel.CRN = core.StringPtr("testString") createOfferingOptionsModel.Label = core.StringPtr("testString") @@ -5682,7 +5960,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") createOfferingOptionsModel.CatalogID = core.StringPtr("testString") createOfferingOptionsModel.CatalogName = core.StringPtr("testString") - createOfferingOptionsModel.Metadata = make(map[string]interface{}) + createOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingOptionsModel.Disclaimer = core.StringPtr("testString") createOfferingOptionsModel.Hidden = core.BoolPtr(true) createOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -5749,7 +6027,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke CreateOffering successfully`, func() { @@ -5842,7 +6120,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -5923,7 +6201,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -5931,7 +6209,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -5947,7 +6225,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -5967,25 +6245,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -6002,7 +6308,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -6022,6 +6328,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -6030,7 +6337,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6042,7 +6349,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6055,7 +6362,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6145,8 +6452,6 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateOfferingOptions model createOfferingOptionsModel := new(catalogmanagementv1.CreateOfferingOptions) createOfferingOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createOfferingOptionsModel.ID = core.StringPtr("testString") - createOfferingOptionsModel.Rev = core.StringPtr("testString") createOfferingOptionsModel.URL = core.StringPtr("testString") createOfferingOptionsModel.CRN = core.StringPtr("testString") createOfferingOptionsModel.Label = core.StringPtr("testString") @@ -6180,7 +6485,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") createOfferingOptionsModel.CatalogID = core.StringPtr("testString") createOfferingOptionsModel.CatalogName = core.StringPtr("testString") - createOfferingOptionsModel.Metadata = make(map[string]interface{}) + createOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingOptionsModel.Disclaimer = core.StringPtr("testString") createOfferingOptionsModel.Hidden = core.BoolPtr(true) createOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -6285,7 +6590,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -6366,7 +6671,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -6374,7 +6679,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -6390,7 +6695,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -6410,25 +6715,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -6445,7 +6778,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -6465,6 +6798,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -6473,7 +6807,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6485,7 +6819,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6498,7 +6832,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6588,8 +6922,6 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateOfferingOptions model createOfferingOptionsModel := new(catalogmanagementv1.CreateOfferingOptions) createOfferingOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createOfferingOptionsModel.ID = core.StringPtr("testString") - createOfferingOptionsModel.Rev = core.StringPtr("testString") createOfferingOptionsModel.URL = core.StringPtr("testString") createOfferingOptionsModel.CRN = core.StringPtr("testString") createOfferingOptionsModel.Label = core.StringPtr("testString") @@ -6623,7 +6955,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") createOfferingOptionsModel.CatalogID = core.StringPtr("testString") createOfferingOptionsModel.CatalogName = core.StringPtr("testString") - createOfferingOptionsModel.Metadata = make(map[string]interface{}) + createOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingOptionsModel.Disclaimer = core.StringPtr("testString") createOfferingOptionsModel.Hidden = core.BoolPtr(true) createOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -6749,7 +7081,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -6830,7 +7162,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -6838,7 +7170,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -6854,7 +7186,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -6874,25 +7206,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -6909,7 +7269,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -6929,6 +7289,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -6937,7 +7298,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6949,7 +7310,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -6962,7 +7323,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -7052,8 +7413,6 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateOfferingOptions model createOfferingOptionsModel := new(catalogmanagementv1.CreateOfferingOptions) createOfferingOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createOfferingOptionsModel.ID = core.StringPtr("testString") - createOfferingOptionsModel.Rev = core.StringPtr("testString") createOfferingOptionsModel.URL = core.StringPtr("testString") createOfferingOptionsModel.CRN = core.StringPtr("testString") createOfferingOptionsModel.Label = core.StringPtr("testString") @@ -7087,7 +7446,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") createOfferingOptionsModel.CatalogID = core.StringPtr("testString") createOfferingOptionsModel.CatalogName = core.StringPtr("testString") - createOfferingOptionsModel.Metadata = make(map[string]interface{}) + createOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingOptionsModel.Disclaimer = core.StringPtr("testString") createOfferingOptionsModel.Hidden = core.BoolPtr(true) createOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -7261,7 +7620,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ImportOfferingVersion successfully with retries`, func() { @@ -7393,7 +7752,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ImportOfferingVersion successfully`, func() { @@ -7803,7 +8162,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ImportOffering successfully with retries`, func() { @@ -7936,7 +8295,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ImportOffering successfully`, func() { @@ -8298,7 +8657,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ReloadOffering successfully with retries`, func() { @@ -8388,7 +8747,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ReloadOffering successfully`, func() { @@ -8604,7 +8963,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke GetOffering successfully with retries`, func() { @@ -8663,7 +9022,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke GetOffering successfully`, func() { @@ -8867,7 +9226,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -8948,7 +9307,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -8956,7 +9315,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -8972,7 +9331,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -8992,25 +9351,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -9027,7 +9414,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -9047,6 +9434,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -9055,7 +9443,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -9067,7 +9455,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -9080,7 +9468,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -9206,7 +9594,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogID = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogName = core.StringPtr("testString") - replaceOfferingOptionsModel.Metadata = make(map[string]interface{}) + replaceOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceOfferingOptionsModel.Disclaimer = core.StringPtr("testString") replaceOfferingOptionsModel.Hidden = core.BoolPtr(true) replaceOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -9270,7 +9658,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ReplaceOffering successfully with retries`, func() { @@ -9358,7 +9746,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -9439,7 +9827,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -9447,7 +9835,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -9463,7 +9851,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -9483,25 +9871,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -9518,7 +9934,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -9538,6 +9954,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -9546,7 +9963,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -9558,7 +9975,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -9571,7 +9988,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -9697,7 +10114,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogID = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogName = core.StringPtr("testString") - replaceOfferingOptionsModel.Metadata = make(map[string]interface{}) + replaceOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceOfferingOptionsModel.Disclaimer = core.StringPtr("testString") replaceOfferingOptionsModel.Hidden = core.BoolPtr(true) replaceOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -9764,7 +10181,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke ReplaceOffering successfully`, func() { @@ -9857,7 +10274,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -9938,7 +10355,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -9946,7 +10363,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -9962,7 +10379,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -9982,25 +10399,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -10017,7 +10462,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -10037,6 +10482,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -10045,7 +10491,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10057,7 +10503,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10070,7 +10516,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10196,7 +10642,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogID = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogName = core.StringPtr("testString") - replaceOfferingOptionsModel.Metadata = make(map[string]interface{}) + replaceOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceOfferingOptionsModel.Disclaimer = core.StringPtr("testString") replaceOfferingOptionsModel.Hidden = core.BoolPtr(true) replaceOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -10301,7 +10747,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -10382,7 +10828,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -10390,7 +10836,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -10406,7 +10852,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -10426,25 +10872,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -10461,7 +10935,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -10481,6 +10955,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -10489,7 +10964,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10501,7 +10976,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10514,7 +10989,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10640,7 +11115,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogID = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogName = core.StringPtr("testString") - replaceOfferingOptionsModel.Metadata = make(map[string]interface{}) + replaceOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceOfferingOptionsModel.Disclaimer = core.StringPtr("testString") replaceOfferingOptionsModel.Hidden = core.BoolPtr(true) replaceOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -10766,7 +11241,7 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") // Construct an instance of the Resource model @@ -10847,7 +11322,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostResource model costResourceModel := new(catalogmanagementv1.CostResource) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} @@ -10855,7 +11330,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CostBreakdown model costBreakdownModel := new(catalogmanagementv1.CostBreakdown) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} // Construct an instance of the CostSummary model @@ -10871,7 +11346,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the Project model projectModel := new(catalogmanagementv1.Project) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel @@ -10891,25 +11366,53 @@ var _ = Describe(`CatalogManagementV1`, func() { costEstimateModel.DiffTotalMonthlyCost = core.StringPtr("testString") costEstimateModel.TimeGenerated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -10926,7 +11429,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -10946,6 +11449,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -10954,7 +11458,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10966,7 +11470,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -10979,7 +11483,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -11105,7 +11609,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceOfferingOptionsModel.PortalUIURL = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogID = core.StringPtr("testString") replaceOfferingOptionsModel.CatalogName = core.StringPtr("testString") - replaceOfferingOptionsModel.Metadata = make(map[string]interface{}) + replaceOfferingOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} replaceOfferingOptionsModel.Disclaimer = core.StringPtr("testString") replaceOfferingOptionsModel.Hidden = core.BoolPtr(true) replaceOfferingOptionsModel.Provider = core.StringPtr("testString") @@ -11224,7 +11728,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke UpdateOffering successfully with retries`, func() { @@ -11306,7 +11810,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke UpdateOffering successfully`, func() { @@ -14066,6 +14570,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.Query()["id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["kind"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["channel"]).To(Equal([]string{"testString"})) + // TODO: Add check for asIs query parameter // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -14093,6 +14598,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getOfferingSourceOptionsModel.ID = core.StringPtr("testString") getOfferingSourceOptionsModel.Kind = core.StringPtr("testString") getOfferingSourceOptionsModel.Channel = core.StringPtr("testString") + getOfferingSourceOptionsModel.AsIs = core.BoolPtr(true) getOfferingSourceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -14137,6 +14643,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.Query()["id"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["kind"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["channel"]).To(Equal([]string{"testString"})) + // TODO: Add check for asIs query parameter // Set mock response res.Header().Set("Content-type", "application/yaml") res.WriteHeader(200) @@ -14166,6 +14673,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getOfferingSourceOptionsModel.ID = core.StringPtr("testString") getOfferingSourceOptionsModel.Kind = core.StringPtr("testString") getOfferingSourceOptionsModel.Channel = core.StringPtr("testString") + getOfferingSourceOptionsModel.AsIs = core.BoolPtr(true) getOfferingSourceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -14192,6 +14700,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getOfferingSourceOptionsModel.ID = core.StringPtr("testString") getOfferingSourceOptionsModel.Kind = core.StringPtr("testString") getOfferingSourceOptionsModel.Channel = core.StringPtr("testString") + getOfferingSourceOptionsModel.AsIs = core.BoolPtr(true) getOfferingSourceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := catalogManagementService.SetServiceURL("") @@ -14239,6 +14748,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getOfferingSourceOptionsModel.ID = core.StringPtr("testString") getOfferingSourceOptionsModel.Kind = core.StringPtr("testString") getOfferingSourceOptionsModel.Channel = core.StringPtr("testString") + getOfferingSourceOptionsModel.AsIs = core.BoolPtr(true) getOfferingSourceOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -15541,7 +16051,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}`) })) }) It(`Invoke GetOfferingWorkingCopy successfully with retries`, func() { @@ -15595,7 +16105,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}`) })) }) It(`Invoke GetOfferingWorkingCopy successfully`, func() { @@ -15825,7 +16335,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke GetVersion successfully with retries`, func() { @@ -15879,7 +16389,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"mapKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCOst": "TotalMonthlyCOst", "resources": [{"name": "Name", "metadata": {"mapKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"mapKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"mapKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "name": "Name", "offering_icon_url": "OfferingIconURL", "offering_docs_url": "OfferingDocsURL", "offering_support_url": "OfferingSupportURL", "tags": ["Tags"], "keywords": ["Keywords"], "rating": {"one_star_count": 12, "two_star_count": 12, "three_star_count": 14, "four_star_count": 13}, "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "kinds": [{"id": "ID", "format_kind": "FormatKind", "install_kind": "InstallKind", "target_kind": "TargetKind", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "versions": [{"id": "ID", "_rev": "Rev", "crn": "CRN", "version": "Version", "flavor": {"name": "Name", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "index": 5}, "sha": "Sha", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "offering_id": "OfferingID", "catalog_id": "CatalogID", "kind_id": "KindID", "tags": ["Tags"], "repo_url": "RepoURL", "source_url": "SourceURL", "tgz_url": "TgzURL", "configuration": [{"key": "Key", "type": "Type", "default_value": "anyValue", "display_name": "DisplayName", "value_constraint": "ValueConstraint", "description": "Description", "required": true, "options": ["anyValue"], "hidden": true, "custom_config": {"type": "Type", "grouping": "Grouping", "original_grouping": "OriginalGrouping", "grouping_index": 13, "config_constraints": {"anyKey": "anyValue"}, "associations": {"parameters": [{"name": "Name", "optionsRefresh": true}]}}, "type_metadata": "TypeMetadata"}], "outputs": [{"key": "Key", "description": "Description"}], "iam_permissions": [{"service_name": "ServiceName", "role_crns": ["RoleCrns"], "resources": [{"name": "Name", "description": "Description", "role_crns": ["RoleCrns"]}]}], "metadata": {"anyKey": "anyValue"}, "validation": {"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}, "required_resources": [{"type": "mem", "value": "anyValue"}], "single_instance": true, "install": {"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}, "pre_install": [{"instructions": "Instructions", "instructions_i18n": {"mapKey": "Inner"}, "script": "Script", "script_permission": "ScriptPermission", "delete_script": "DeleteScript", "scope": "Scope"}], "entitlement": {"provider_name": "ProviderName", "provider_id": "ProviderID", "product_id": "ProductID", "part_numbers": ["PartNumbers"], "image_repo_name": "ImageRepoName"}, "licenses": [{"id": "ID", "name": "Name", "type": "Type", "url": "URL", "description": "Description"}], "image_manifest_url": "ImageManifestURL", "deprecated": true, "package_version": "PackageVersion", "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "version_locator": "VersionLocator", "long_description": "LongDescription", "long_description_i18n": {"mapKey": "Inner"}, "whitelisted_accounts": ["WhitelistedAccounts"], "image_pull_key_name": "ImagePullKeyName", "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "solution_info": {"architecture_diagrams": [{"diagram": {"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "cost_estimate": {"version": "Version", "currency": "Currency", "projects": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "pastBreakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "breakdown": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "diff": {"totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "resources": [{"name": "Name", "metadata": {"anyKey": "anyValue"}, "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost", "costComponents": [{"name": "Name", "unit": "Unit", "hourlyQuantity": "HourlyQuantity", "monthlyQuantity": "MonthlyQuantity", "price": "Price", "hourlyCost": "HourlyCost", "monthlyCost": "MonthlyCost"}]}]}, "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}}], "summary": {"totalDetectedResources": 22, "totalSupportedResources": 23, "totalUnsupportedResources": 25, "totalUsageBasedResources": 24, "totalNoPriceResources": 21, "unsupportedResourceCounts": {"mapKey": 5}, "noPriceResourceCounts": {"mapKey": 5}}, "totalHourlyCost": "TotalHourlyCost", "totalMonthlyCost": "TotalMonthlyCost", "pastTotalHourlyCost": "PastTotalHourlyCost", "pastTotalMonthlyCost": "PastTotalMonthlyCost", "diffTotalHourlyCost": "DiffTotalHourlyCost", "diffTotalMonthlyCost": "DiffTotalMonthlyCost", "timeGenerated": "2019-01-01T12:00:00.000Z"}, "dependencies": [{"catalog_id": "CatalogID", "id": "ID", "name": "Name", "kind": "Kind", "version": "Version", "flavors": ["Flavors"]}]}, "is_consumable": true, "compliance": [{"scc_profile": {"type": "Type"}, "family": {"id": "ID", "external_id": "ExternalID", "description": "Description", "ui_href": "UIHref"}, "goals": [{"id": "ID", "description": "Description", "ui_href": "UIHref"}], "validation": {"certified": false, "results": {"anyKey": "anyValue"}}}]}], "plans": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "additional_features": [{"title": "Title", "title_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}}], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "deployments": [{"id": "ID", "label": "Label", "name": "Name", "short_description": "ShortDescription", "long_description": "LongDescription", "metadata": {"anyKey": "anyValue"}, "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z"}]}]}], "pc_managed": false, "publish_approved": false, "share_with_all": true, "share_with_ibm": true, "share_enabled": true, "permit_request_ibm_public_publish": false, "ibm_publish_approved": true, "public_publish_approved": false, "public_original_crn": "PublicOriginalCRN", "publish_public_crn": "PublishPublicCRN", "portal_approval_record": "PortalApprovalRecord", "portal_ui_url": "PortalUIURL", "catalog_id": "CatalogID", "catalog_name": "CatalogName", "metadata": {"anyKey": "anyValue"}, "disclaimer": "Disclaimer", "hidden": true, "provider": "Provider", "provider_info": {"id": "ID", "name": "Name"}, "repo_info": {"token": "Token", "type": "Type"}, "image_pull_keys": [{"name": "Name", "value": "Value", "description": "Description"}], "support": {"url": "URL", "process": "Process", "process_i18n": {"mapKey": "Inner"}, "locations": ["Locations"], "support_details": [{"type": "Type", "contact": "Contact", "response_wait_time": {"value": 5, "type": "Type"}, "availability": {"times": [{"day": 3, "start_time": "StartTime", "end_time": "EndTime"}], "timezone": "Timezone", "always_available": false}}], "support_escalation": {"escalation_wait_time": {"value": 5, "type": "Type"}, "response_wait_time": {"value": 5, "type": "Type"}, "contact": "Contact"}, "support_type": "SupportType"}, "media": [{"url": "URL", "api_url": "APIURL", "url_proxy": {"url": "URL", "sha": "Sha"}, "caption": "Caption", "caption_i18n": {"mapKey": "Inner"}, "type": "Type", "thumbnail_url": "ThumbnailURL"}], "deprecate_pending": {"deprecate_date": "2019-01-01T12:00:00.000Z", "deprecate_state": "DeprecateState", "description": "Description"}, "product_kind": "ProductKind", "badges": [{"id": "ID", "label": "Label", "label_i18n": {"mapKey": "Inner"}, "description": "Description", "description_i18n": {"mapKey": "Inner"}, "icon": "Icon", "authority": "Authority", "tag": "Tag", "learn_more_links": {"first_party": "FirstParty", "third_party": "ThirdParty"}, "constraints": [{"type": "Type", "rule": "anyValue"}]}]}`) })) }) It(`Invoke GetVersion successfully`, func() { @@ -16111,21 +16621,25 @@ var _ = Describe(`CatalogManagementV1`, func() { }) }) }) - Describe(`AccountPublishVersion(accountPublishVersionOptions *AccountPublishVersionOptions)`, func() { - accountPublishVersionPath := "/versions/testString/account-publish" - Context(`Using mock server endpoint`, func() { + Describe(`GetCluster(getClusterOptions *GetClusterOptions) - Operation response error`, func() { + getClusterPath := "/deploy/kubernetes/clusters/testString" + Context(`Using mock server endpoint with invalid JSON response`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(accountPublishVersionPath)) - Expect(req.Method).To(Equal("POST")) - - res.WriteHeader(202) + Expect(req.URL.EscapedPath()).To(Equal(getClusterPath)) + Expect(req.Method).To(Equal("GET")) + Expect(req.Header["X-Auth-Refresh-Token"]).ToNot(BeNil()) + Expect(req.Header["X-Auth-Refresh-Token"][0]).To(Equal(fmt.Sprintf("%v", "testString"))) + Expect(req.URL.Query()["region"]).To(Equal([]string{"testString"})) + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprint(res, `} this is not valid json {`) })) }) - It(`Invoke AccountPublishVersion successfully`, func() { + It(`Invoke GetCluster with error: Operation response processing error`, func() { catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -16133,287 +16647,79 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(serviceErr).To(BeNil()) Expect(catalogManagementService).ToNot(BeNil()) - // Invoke operation with nil options model (negative test) - response, operationErr := catalogManagementService.AccountPublishVersion(nil) - Expect(operationErr).NotTo(BeNil()) - Expect(response).To(BeNil()) - - // Construct an instance of the AccountPublishVersionOptions model - accountPublishVersionOptionsModel := new(catalogmanagementv1.AccountPublishVersionOptions) - accountPublishVersionOptionsModel.VersionLocID = core.StringPtr("testString") - accountPublishVersionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - - // Invoke operation with valid options model (positive test) - response, operationErr = catalogManagementService.AccountPublishVersion(accountPublishVersionOptionsModel) - Expect(operationErr).To(BeNil()) + // Construct an instance of the GetClusterOptions model + getClusterOptionsModel := new(catalogmanagementv1.GetClusterOptions) + getClusterOptionsModel.ClusterID = core.StringPtr("testString") + getClusterOptionsModel.Region = core.StringPtr("testString") + getClusterOptionsModel.XAuthRefreshToken = core.StringPtr("testString") + getClusterOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Expect response parsing to fail since we are receiving a text/plain response + result, response, operationErr := catalogManagementService.GetCluster(getClusterOptionsModel) + Expect(operationErr).ToNot(BeNil()) Expect(response).ToNot(BeNil()) - }) - It(`Invoke AccountPublishVersion with error: Operation validation and request error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) + Expect(result).To(BeNil()) - // Construct an instance of the AccountPublishVersionOptions model - accountPublishVersionOptionsModel := new(catalogmanagementv1.AccountPublishVersionOptions) - accountPublishVersionOptionsModel.VersionLocID = core.StringPtr("testString") - accountPublishVersionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Invoke operation with empty URL (negative test) - err := catalogManagementService.SetServiceURL("") - Expect(err).To(BeNil()) - response, operationErr := catalogManagementService.AccountPublishVersion(accountPublishVersionOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) - Expect(response).To(BeNil()) - // Construct a second instance of the AccountPublishVersionOptions model with no property values - accountPublishVersionOptionsModelNew := new(catalogmanagementv1.AccountPublishVersionOptions) - // Invoke operation with invalid model (negative test) - response, operationErr = catalogManagementService.AccountPublishVersion(accountPublishVersionOptionsModelNew) + // Enable retries and test again + catalogManagementService.EnableRetries(0, 0) + result, response, operationErr = catalogManagementService.GetCluster(getClusterOptionsModel) Expect(operationErr).ToNot(BeNil()) - Expect(response).To(BeNil()) + Expect(response).ToNot(BeNil()) + Expect(result).To(BeNil()) }) AfterEach(func() { testServer.Close() }) }) }) - Describe(`IBMPublishVersion(ibmPublishVersionOptions *IBMPublishVersionOptions)`, func() { - ibmPublishVersionPath := "/versions/testString/ibm-publish" - Context(`Using mock server endpoint`, func() { + Describe(`GetCluster(getClusterOptions *GetClusterOptions)`, func() { + getClusterPath := "/deploy/kubernetes/clusters/testString" + Context(`Using mock server endpoint with timeout`, func() { BeforeEach(func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(ibmPublishVersionPath)) - Expect(req.Method).To(Equal("POST")) + Expect(req.URL.EscapedPath()).To(Equal(getClusterPath)) + Expect(req.Method).To(Equal("GET")) - res.WriteHeader(202) + Expect(req.Header["X-Auth-Refresh-Token"]).ToNot(BeNil()) + Expect(req.Header["X-Auth-Refresh-Token"][0]).To(Equal(fmt.Sprintf("%v", "testString"))) + Expect(req.URL.Query()["region"]).To(Equal([]string{"testString"})) + // Sleep a short time to support a timeout test + time.Sleep(100 * time.Millisecond) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + fmt.Fprintf(res, "%s", `{"resource_group_id": "ResourceGroupID", "resource_group_name": "ResourceGroupName", "id": "ID", "name": "Name", "region": "Region", "ingress_hostname": "IngressHostname", "provider": "Provider", "status": "Status"}`) })) }) - It(`Invoke IBMPublishVersion successfully`, func() { + It(`Invoke GetCluster successfully with retries`, func() { catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, }) Expect(serviceErr).To(BeNil()) Expect(catalogManagementService).ToNot(BeNil()) + catalogManagementService.EnableRetries(0, 0) - // Invoke operation with nil options model (negative test) - response, operationErr := catalogManagementService.IBMPublishVersion(nil) - Expect(operationErr).NotTo(BeNil()) - Expect(response).To(BeNil()) + // Construct an instance of the GetClusterOptions model + getClusterOptionsModel := new(catalogmanagementv1.GetClusterOptions) + getClusterOptionsModel.ClusterID = core.StringPtr("testString") + getClusterOptionsModel.Region = core.StringPtr("testString") + getClusterOptionsModel.XAuthRefreshToken = core.StringPtr("testString") + getClusterOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Construct an instance of the IBMPublishVersionOptions model - ibmPublishVersionOptionsModel := new(catalogmanagementv1.IBMPublishVersionOptions) - ibmPublishVersionOptionsModel.VersionLocID = core.StringPtr("testString") - ibmPublishVersionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + // Invoke operation with a Context to test a timeout error + ctx, cancelFunc := context.WithTimeout(context.Background(), 80*time.Millisecond) + defer cancelFunc() + _, _, operationErr := catalogManagementService.GetClusterWithContext(ctx, getClusterOptionsModel) + Expect(operationErr).ToNot(BeNil()) + Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) - // Invoke operation with valid options model (positive test) - response, operationErr = catalogManagementService.IBMPublishVersion(ibmPublishVersionOptionsModel) - Expect(operationErr).To(BeNil()) - Expect(response).ToNot(BeNil()) - }) - It(`Invoke IBMPublishVersion with error: Operation validation and request error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Construct an instance of the IBMPublishVersionOptions model - ibmPublishVersionOptionsModel := new(catalogmanagementv1.IBMPublishVersionOptions) - ibmPublishVersionOptionsModel.VersionLocID = core.StringPtr("testString") - ibmPublishVersionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Invoke operation with empty URL (negative test) - err := catalogManagementService.SetServiceURL("") - Expect(err).To(BeNil()) - response, operationErr := catalogManagementService.IBMPublishVersion(ibmPublishVersionOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) - Expect(response).To(BeNil()) - // Construct a second instance of the IBMPublishVersionOptions model with no property values - ibmPublishVersionOptionsModelNew := new(catalogmanagementv1.IBMPublishVersionOptions) - // Invoke operation with invalid model (negative test) - response, operationErr = catalogManagementService.IBMPublishVersion(ibmPublishVersionOptionsModelNew) - Expect(operationErr).ToNot(BeNil()) - Expect(response).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() - }) - }) - }) - Describe(`PublicPublishVersion(publicPublishVersionOptions *PublicPublishVersionOptions)`, func() { - publicPublishVersionPath := "/versions/testString/public-publish" - Context(`Using mock server endpoint`, func() { - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - defer GinkgoRecover() - - // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(publicPublishVersionPath)) - Expect(req.Method).To(Equal("POST")) - - res.WriteHeader(202) - })) - }) - It(`Invoke PublicPublishVersion successfully`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Invoke operation with nil options model (negative test) - response, operationErr := catalogManagementService.PublicPublishVersion(nil) - Expect(operationErr).NotTo(BeNil()) - Expect(response).To(BeNil()) - - // Construct an instance of the PublicPublishVersionOptions model - publicPublishVersionOptionsModel := new(catalogmanagementv1.PublicPublishVersionOptions) - publicPublishVersionOptionsModel.VersionLocID = core.StringPtr("testString") - publicPublishVersionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - - // Invoke operation with valid options model (positive test) - response, operationErr = catalogManagementService.PublicPublishVersion(publicPublishVersionOptionsModel) - Expect(operationErr).To(BeNil()) - Expect(response).ToNot(BeNil()) - }) - It(`Invoke PublicPublishVersion with error: Operation validation and request error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Construct an instance of the PublicPublishVersionOptions model - publicPublishVersionOptionsModel := new(catalogmanagementv1.PublicPublishVersionOptions) - publicPublishVersionOptionsModel.VersionLocID = core.StringPtr("testString") - publicPublishVersionOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Invoke operation with empty URL (negative test) - err := catalogManagementService.SetServiceURL("") - Expect(err).To(BeNil()) - response, operationErr := catalogManagementService.PublicPublishVersion(publicPublishVersionOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) - Expect(response).To(BeNil()) - // Construct a second instance of the PublicPublishVersionOptions model with no property values - publicPublishVersionOptionsModelNew := new(catalogmanagementv1.PublicPublishVersionOptions) - // Invoke operation with invalid model (negative test) - response, operationErr = catalogManagementService.PublicPublishVersion(publicPublishVersionOptionsModelNew) - Expect(operationErr).ToNot(BeNil()) - Expect(response).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() - }) - }) - }) - Describe(`GetCluster(getClusterOptions *GetClusterOptions) - Operation response error`, func() { - getClusterPath := "/deploy/kubernetes/clusters/testString" - Context(`Using mock server endpoint with invalid JSON response`, func() { - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - defer GinkgoRecover() - - // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(getClusterPath)) - Expect(req.Method).To(Equal("GET")) - Expect(req.Header["X-Auth-Refresh-Token"]).ToNot(BeNil()) - Expect(req.Header["X-Auth-Refresh-Token"][0]).To(Equal(fmt.Sprintf("%v", "testString"))) - Expect(req.URL.Query()["region"]).To(Equal([]string{"testString"})) - res.Header().Set("Content-type", "application/json") - res.WriteHeader(200) - fmt.Fprint(res, `} this is not valid json {`) - })) - }) - It(`Invoke GetCluster with error: Operation response processing error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Construct an instance of the GetClusterOptions model - getClusterOptionsModel := new(catalogmanagementv1.GetClusterOptions) - getClusterOptionsModel.ClusterID = core.StringPtr("testString") - getClusterOptionsModel.Region = core.StringPtr("testString") - getClusterOptionsModel.XAuthRefreshToken = core.StringPtr("testString") - getClusterOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Expect response parsing to fail since we are receiving a text/plain response - result, response, operationErr := catalogManagementService.GetCluster(getClusterOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(response).ToNot(BeNil()) - Expect(result).To(BeNil()) - - // Enable retries and test again - catalogManagementService.EnableRetries(0, 0) - result, response, operationErr = catalogManagementService.GetCluster(getClusterOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(response).ToNot(BeNil()) - Expect(result).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() - }) - }) - }) - Describe(`GetCluster(getClusterOptions *GetClusterOptions)`, func() { - getClusterPath := "/deploy/kubernetes/clusters/testString" - Context(`Using mock server endpoint with timeout`, func() { - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - defer GinkgoRecover() - - // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(getClusterPath)) - Expect(req.Method).To(Equal("GET")) - - Expect(req.Header["X-Auth-Refresh-Token"]).ToNot(BeNil()) - Expect(req.Header["X-Auth-Refresh-Token"][0]).To(Equal(fmt.Sprintf("%v", "testString"))) - Expect(req.URL.Query()["region"]).To(Equal([]string{"testString"})) - // Sleep a short time to support a timeout test - time.Sleep(100 * time.Millisecond) - - // Set mock response - res.Header().Set("Content-type", "application/json") - res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"resource_group_id": "ResourceGroupID", "resource_group_name": "ResourceGroupName", "id": "ID", "name": "Name", "region": "Region", "ingress_hostname": "IngressHostname", "provider": "Provider", "status": "Status"}`) - })) - }) - It(`Invoke GetCluster successfully with retries`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - catalogManagementService.EnableRetries(0, 0) - - // Construct an instance of the GetClusterOptions model - getClusterOptionsModel := new(catalogmanagementv1.GetClusterOptions) - getClusterOptionsModel.ClusterID = core.StringPtr("testString") - getClusterOptionsModel.Region = core.StringPtr("testString") - getClusterOptionsModel.XAuthRefreshToken = core.StringPtr("testString") - getClusterOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - - // Invoke operation with a Context to test a timeout error - ctx, cancelFunc := context.WithTimeout(context.Background(), 80*time.Millisecond) - defer cancelFunc() - _, _, operationErr := catalogManagementService.GetClusterWithContext(ctx, getClusterOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring("deadline exceeded")) - - // Disable retries and test again - catalogManagementService.DisableRetries() - result, response, operationErr := catalogManagementService.GetCluster(getClusterOptionsModel) + // Disable retries and test again + catalogManagementService.DisableRetries() + result, response, operationErr := catalogManagementService.GetCluster(getClusterOptionsModel) Expect(operationErr).To(BeNil()) Expect(response).ToNot(BeNil()) Expect(result).ToNot(BeNil()) @@ -16559,7 +16865,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.Header["X-Auth-Refresh-Token"]).ToNot(BeNil()) Expect(req.Header["X-Auth-Refresh-Token"][0]).To(Equal(fmt.Sprintf("%v", "testString"))) Expect(req.URL.Query()["region"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -16579,7 +16885,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getNamespacesOptionsModel.ClusterID = core.StringPtr("testString") getNamespacesOptionsModel.Region = core.StringPtr("testString") getNamespacesOptionsModel.XAuthRefreshToken = core.StringPtr("testString") - getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(10)) getNamespacesOptionsModel.Offset = core.Int64Ptr(int64(38)) getNamespacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response @@ -16614,7 +16920,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.Header["X-Auth-Refresh-Token"]).ToNot(BeNil()) Expect(req.Header["X-Auth-Refresh-Token"][0]).To(Equal(fmt.Sprintf("%v", "testString"))) Expect(req.URL.Query()["region"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -16639,7 +16945,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getNamespacesOptionsModel.ClusterID = core.StringPtr("testString") getNamespacesOptionsModel.Region = core.StringPtr("testString") getNamespacesOptionsModel.XAuthRefreshToken = core.StringPtr("testString") - getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(10)) getNamespacesOptionsModel.Offset = core.Int64Ptr(int64(38)) getNamespacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -16680,7 +16986,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.Header["X-Auth-Refresh-Token"]).ToNot(BeNil()) Expect(req.Header["X-Auth-Refresh-Token"][0]).To(Equal(fmt.Sprintf("%v", "testString"))) Expect(req.URL.Query()["region"]).To(Equal([]string{"testString"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // Set mock response res.Header().Set("Content-type", "application/json") @@ -16707,7 +17013,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getNamespacesOptionsModel.ClusterID = core.StringPtr("testString") getNamespacesOptionsModel.Region = core.StringPtr("testString") getNamespacesOptionsModel.XAuthRefreshToken = core.StringPtr("testString") - getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(10)) getNamespacesOptionsModel.Offset = core.Int64Ptr(int64(38)) getNamespacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -16731,7 +17037,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getNamespacesOptionsModel.ClusterID = core.StringPtr("testString") getNamespacesOptionsModel.Region = core.StringPtr("testString") getNamespacesOptionsModel.XAuthRefreshToken = core.StringPtr("testString") - getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(10)) getNamespacesOptionsModel.Offset = core.Int64Ptr(int64(38)) getNamespacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) @@ -16776,7 +17082,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getNamespacesOptionsModel.ClusterID = core.StringPtr("testString") getNamespacesOptionsModel.Region = core.StringPtr("testString") getNamespacesOptionsModel.XAuthRefreshToken = core.StringPtr("testString") - getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getNamespacesOptionsModel.Limit = core.Int64Ptr(int64(10)) getNamespacesOptionsModel.Offset = core.Int64Ptr(int64(38)) getNamespacesOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -16792,6 +17098,115 @@ var _ = Describe(`CatalogManagementV1`, func() { testServer.Close() }) }) + Context(`Test pagination helper method on response`, func() { + It(`Invoke GetNextOffset successfully`, func() { + responseObject := new(catalogmanagementv1.NamespaceSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=135") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(Equal(core.Int64Ptr(int64(135)))) + }) + It(`Invoke GetNextOffset without a "Next" property in the response`, func() { + responseObject := new(catalogmanagementv1.NamespaceSearchResult) + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset without any query params in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.NamespaceSearchResult) + responseObject.Next = core.StringPtr("ibm.com") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset with a non-integer query param in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.NamespaceSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=tiger") + + value, err := responseObject.GetNextOffset() + Expect(err).NotTo(BeNil()) + Expect(value).To(BeNil()) + }) + }) + Context(`Using mock server endpoint - paginated response`, func() { + BeforeEach(func() { + var requestNumber int = 0 + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(getNamespacesPath)) + Expect(req.Method).To(Equal("GET")) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + requestNumber++ + if requestNumber == 1 { + fmt.Fprintf(res, "%s", `{"next":"https://myhost.com/somePath?offset=1","total_count":2,"limit":1,"resources":["Resources"]}`) + } else if requestNumber == 2 { + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"resources":["Resources"]}`) + } else { + res.WriteHeader(400) + } + })) + }) + It(`Use GetNamespacesPager.GetNext successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + getNamespacesOptionsModel := &catalogmanagementv1.GetNamespacesOptions{ + ClusterID: core.StringPtr("testString"), + Region: core.StringPtr("testString"), + XAuthRefreshToken: core.StringPtr("testString"), + Limit: core.Int64Ptr(int64(10)), + } + + pager, err := catalogManagementService.NewGetNamespacesPager(getNamespacesOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + var allResults []string + for pager.HasNext() { + nextPage, err := pager.GetNext() + Expect(err).To(BeNil()) + Expect(nextPage).ToNot(BeNil()) + allResults = append(allResults, nextPage...) + } + Expect(len(allResults)).To(Equal(2)) + }) + It(`Use GetNamespacesPager.GetAll successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + getNamespacesOptionsModel := &catalogmanagementv1.GetNamespacesOptions{ + ClusterID: core.StringPtr("testString"), + Region: core.StringPtr("testString"), + XAuthRefreshToken: core.StringPtr("testString"), + Limit: core.Int64Ptr(int64(10)), + } + + pager, err := catalogManagementService.NewGetNamespacesPager(getNamespacesOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + allResults, err := pager.GetAll() + Expect(err).To(BeNil()) + Expect(allResults).ToNot(BeNil()) + Expect(len(allResults)).To(Equal(2)) + }) + }) }) Describe(`DeployOperators(deployOperatorsOptions *DeployOperatorsOptions) - Operation response error`, func() { deployOperatorsPath := "/deploy/kubernetes/olm/operator" @@ -18100,7 +18515,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"metadata": {"cluster_id": "ClusterID", "region": "Region", "namespace": "Namespace", "workspace_id": "WorkspaceID", "workspace_name": "WorkspaceName"}, "release": {"deployments": [{"mapKey": "anyValue"}], "replicasets": [{"mapKey": "anyValue"}], "statefulsets": [{"mapKey": "anyValue"}], "pods": [{"mapKey": "anyValue"}], "errors": [{"mapKey": "Inner"}]}, "content_mgmt": {"pods": [{"mapKey": "Inner"}], "errors": [{"mapKey": "Inner"}]}}`) + fmt.Fprintf(res, "%s", `{"metadata": {"cluster_id": "ClusterID", "region": "Region", "namespace": "Namespace", "workspace_id": "WorkspaceID", "workspace_name": "WorkspaceName"}, "release": {"deployments": [{"anyKey": "anyValue"}], "replicasets": [{"anyKey": "anyValue"}], "statefulsets": [{"anyKey": "anyValue"}], "pods": [{"anyKey": "anyValue"}], "errors": [{"mapKey": "Inner"}]}, "content_mgmt": {"pods": [{"mapKey": "Inner"}], "errors": [{"mapKey": "Inner"}]}}`) })) }) It(`Invoke GetPreinstall successfully with retries`, func() { @@ -18163,7 +18578,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"metadata": {"cluster_id": "ClusterID", "region": "Region", "namespace": "Namespace", "workspace_id": "WorkspaceID", "workspace_name": "WorkspaceName"}, "release": {"deployments": [{"mapKey": "anyValue"}], "replicasets": [{"mapKey": "anyValue"}], "statefulsets": [{"mapKey": "anyValue"}], "pods": [{"mapKey": "anyValue"}], "errors": [{"mapKey": "Inner"}]}, "content_mgmt": {"pods": [{"mapKey": "Inner"}], "errors": [{"mapKey": "Inner"}]}}`) + fmt.Fprintf(res, "%s", `{"metadata": {"cluster_id": "ClusterID", "region": "Region", "namespace": "Namespace", "workspace_id": "WorkspaceID", "workspace_name": "WorkspaceName"}, "release": {"deployments": [{"anyKey": "anyValue"}], "replicasets": [{"anyKey": "anyValue"}], "statefulsets": [{"anyKey": "anyValue"}], "pods": [{"anyKey": "anyValue"}], "errors": [{"mapKey": "Inner"}]}, "content_mgmt": {"pods": [{"mapKey": "Inner"}], "errors": [{"mapKey": "Inner"}]}}`) })) }) It(`Invoke GetPreinstall successfully`, func() { @@ -18508,7 +18923,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}`) + fmt.Fprintf(res, "%s", `{"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}`) })) }) It(`Invoke GetValidationStatus successfully with retries`, func() { @@ -18565,7 +18980,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"mapKey": "anyValue"}, "message": "Message"}`) + fmt.Fprintf(res, "%s", `{"validated": "2019-01-01T12:00:00.000Z", "requested": "2019-01-01T12:00:00.000Z", "state": "State", "last_operation": "LastOperation", "target": {"anyKey": "anyValue"}, "message": "Message"}`) })) }) It(`Invoke GetValidationStatus successfully`, func() { @@ -18681,7 +19096,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"mapKey": "anyValue"}`) + fmt.Fprintf(res, "%s", `{"anyKey": "anyValue"}`) })) }) It(`Invoke GetOverrideValues successfully with retries`, func() { @@ -18735,7 +19150,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"mapKey": "anyValue"}`) + fmt.Fprintf(res, "%s", `{"anyKey": "anyValue"}`) })) }) It(`Invoke GetOverrideValues successfully`, func() { @@ -18843,7 +19258,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.Method).To(Equal("GET")) Expect(req.URL.Query()["query"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["kind"]).To(Equal([]string{"vpe"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // TODO: Add check for collapse query parameter // TODO: Add check for digest query parameter @@ -18864,7 +19279,7 @@ var _ = Describe(`CatalogManagementV1`, func() { searchObjectsOptionsModel := new(catalogmanagementv1.SearchObjectsOptions) searchObjectsOptionsModel.Query = core.StringPtr("testString") searchObjectsOptionsModel.Kind = core.StringPtr("vpe") - searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) searchObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) searchObjectsOptionsModel.Collapse = core.BoolPtr(true) searchObjectsOptionsModel.Digest = core.BoolPtr(true) @@ -18900,7 +19315,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.Query()["query"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["kind"]).To(Equal([]string{"vpe"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // TODO: Add check for collapse query parameter // TODO: Add check for digest query parameter @@ -18910,7 +19325,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}]}`) })) }) It(`Invoke SearchObjects successfully with retries`, func() { @@ -18926,7 +19341,7 @@ var _ = Describe(`CatalogManagementV1`, func() { searchObjectsOptionsModel := new(catalogmanagementv1.SearchObjectsOptions) searchObjectsOptionsModel.Query = core.StringPtr("testString") searchObjectsOptionsModel.Kind = core.StringPtr("vpe") - searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) searchObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) searchObjectsOptionsModel.Collapse = core.BoolPtr(true) searchObjectsOptionsModel.Digest = core.BoolPtr(true) @@ -18968,14 +19383,14 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.Query()["query"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["kind"]).To(Equal([]string{"vpe"})) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // TODO: Add check for collapse query parameter // TODO: Add check for digest query parameter // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}]}`) })) }) It(`Invoke SearchObjects successfully`, func() { @@ -18996,7 +19411,7 @@ var _ = Describe(`CatalogManagementV1`, func() { searchObjectsOptionsModel := new(catalogmanagementv1.SearchObjectsOptions) searchObjectsOptionsModel.Query = core.StringPtr("testString") searchObjectsOptionsModel.Kind = core.StringPtr("vpe") - searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) searchObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) searchObjectsOptionsModel.Collapse = core.BoolPtr(true) searchObjectsOptionsModel.Digest = core.BoolPtr(true) @@ -19021,7 +19436,7 @@ var _ = Describe(`CatalogManagementV1`, func() { searchObjectsOptionsModel := new(catalogmanagementv1.SearchObjectsOptions) searchObjectsOptionsModel.Query = core.StringPtr("testString") searchObjectsOptionsModel.Kind = core.StringPtr("vpe") - searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) searchObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) searchObjectsOptionsModel.Collapse = core.BoolPtr(true) searchObjectsOptionsModel.Digest = core.BoolPtr(true) @@ -19067,7 +19482,7 @@ var _ = Describe(`CatalogManagementV1`, func() { searchObjectsOptionsModel := new(catalogmanagementv1.SearchObjectsOptions) searchObjectsOptionsModel.Query = core.StringPtr("testString") searchObjectsOptionsModel.Kind = core.StringPtr("vpe") - searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + searchObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) searchObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) searchObjectsOptionsModel.Collapse = core.BoolPtr(true) searchObjectsOptionsModel.Digest = core.BoolPtr(true) @@ -19085,6 +19500,117 @@ var _ = Describe(`CatalogManagementV1`, func() { testServer.Close() }) }) + Context(`Test pagination helper method on response`, func() { + It(`Invoke GetNextOffset successfully`, func() { + responseObject := new(catalogmanagementv1.ObjectSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=135") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(Equal(core.Int64Ptr(int64(135)))) + }) + It(`Invoke GetNextOffset without a "Next" property in the response`, func() { + responseObject := new(catalogmanagementv1.ObjectSearchResult) + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset without any query params in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.ObjectSearchResult) + responseObject.Next = core.StringPtr("ibm.com") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset with a non-integer query param in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.ObjectSearchResult) + responseObject.Next = core.StringPtr("ibm.com?offset=tiger") + + value, err := responseObject.GetNextOffset() + Expect(err).NotTo(BeNil()) + Expect(value).To(BeNil()) + }) + }) + Context(`Using mock server endpoint - paginated response`, func() { + BeforeEach(func() { + var requestNumber int = 0 + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(searchObjectsPath)) + Expect(req.Method).To(Equal("GET")) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + requestNumber++ + if requestNumber == 1 { + fmt.Fprintf(res, "%s", `{"next":"https://myhost.com/somePath?offset=1","total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","name":"Name","crn":"CRN","url":"URL","parent_id":"ParentID","label_i18n":{"mapKey":"Inner"},"label":"Label","tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"kind":"Kind","publish":{"permit_ibm_public_publish":true,"ibm_approved":false,"public_approved":true,"portal_approval_record":"PortalApprovalRecord","portal_url":"PortalURL"},"state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"catalog_id":"CatalogID","catalog_name":"CatalogName","data":{"anyKey":"anyValue"}}]}`) + } else if requestNumber == 2 { + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","name":"Name","crn":"CRN","url":"URL","parent_id":"ParentID","label_i18n":{"mapKey":"Inner"},"label":"Label","tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"kind":"Kind","publish":{"permit_ibm_public_publish":true,"ibm_approved":false,"public_approved":true,"portal_approval_record":"PortalApprovalRecord","portal_url":"PortalURL"},"state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"catalog_id":"CatalogID","catalog_name":"CatalogName","data":{"anyKey":"anyValue"}}]}`) + } else { + res.WriteHeader(400) + } + })) + }) + It(`Use SearchObjectsPager.GetNext successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + searchObjectsOptionsModel := &catalogmanagementv1.SearchObjectsOptions{ + Query: core.StringPtr("testString"), + Kind: core.StringPtr("vpe"), + Limit: core.Int64Ptr(int64(10)), + Collapse: core.BoolPtr(true), + Digest: core.BoolPtr(true), + } + + pager, err := catalogManagementService.NewSearchObjectsPager(searchObjectsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + var allResults []catalogmanagementv1.CatalogObject + for pager.HasNext() { + nextPage, err := pager.GetNext() + Expect(err).To(BeNil()) + Expect(nextPage).ToNot(BeNil()) + allResults = append(allResults, nextPage...) + } + Expect(len(allResults)).To(Equal(2)) + }) + It(`Use SearchObjectsPager.GetAll successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + searchObjectsOptionsModel := &catalogmanagementv1.SearchObjectsOptions{ + Query: core.StringPtr("testString"), + Kind: core.StringPtr("vpe"), + Limit: core.Int64Ptr(int64(10)), + Collapse: core.BoolPtr(true), + Digest: core.BoolPtr(true), + } + + pager, err := catalogManagementService.NewSearchObjectsPager(searchObjectsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + allResults, err := pager.GetAll() + Expect(err).To(BeNil()) + Expect(allResults).ToNot(BeNil()) + Expect(len(allResults)).To(Equal(2)) + }) + }) }) Describe(`ListObjects(listObjectsOptions *ListObjectsOptions) - Operation response error`, func() { listObjectsPath := "/catalogs/testString/objects" @@ -19096,7 +19622,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Verify the contents of the request Expect(req.URL.EscapedPath()).To(Equal(listObjectsPath)) Expect(req.Method).To(Equal("GET")) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"testString"})) @@ -19116,7 +19642,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the ListObjectsOptions model listObjectsOptionsModel := new(catalogmanagementv1.ListObjectsOptions) listObjectsOptionsModel.CatalogIdentifier = core.StringPtr("testString") - listObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) listObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) listObjectsOptionsModel.Name = core.StringPtr("testString") listObjectsOptionsModel.Sort = core.StringPtr("testString") @@ -19150,7 +19676,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listObjectsPath)) Expect(req.Method).To(Equal("GET")) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"testString"})) @@ -19160,7 +19686,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}]}`) })) }) It(`Invoke ListObjects successfully with retries`, func() { @@ -19175,7 +19701,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the ListObjectsOptions model listObjectsOptionsModel := new(catalogmanagementv1.ListObjectsOptions) listObjectsOptionsModel.CatalogIdentifier = core.StringPtr("testString") - listObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) listObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) listObjectsOptionsModel.Name = core.StringPtr("testString") listObjectsOptionsModel.Sort = core.StringPtr("testString") @@ -19215,14 +19741,14 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(listObjectsPath)) Expect(req.Method).To(Equal("GET")) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) Expect(req.URL.Query()["name"]).To(Equal([]string{"testString"})) Expect(req.URL.Query()["sort"]).To(Equal([]string{"testString"})) // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}]}`) + fmt.Fprintf(res, "%s", `{"offset": 6, "limit": 5, "total_count": 10, "resource_count": 13, "first": "First", "last": "Last", "prev": "Prev", "next": "Next", "resources": [{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}]}`) })) }) It(`Invoke ListObjects successfully`, func() { @@ -19242,7 +19768,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the ListObjectsOptions model listObjectsOptionsModel := new(catalogmanagementv1.ListObjectsOptions) listObjectsOptionsModel.CatalogIdentifier = core.StringPtr("testString") - listObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) listObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) listObjectsOptionsModel.Name = core.StringPtr("testString") listObjectsOptionsModel.Sort = core.StringPtr("testString") @@ -19266,7 +19792,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the ListObjectsOptions model listObjectsOptionsModel := new(catalogmanagementv1.ListObjectsOptions) listObjectsOptionsModel.CatalogIdentifier = core.StringPtr("testString") - listObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) listObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) listObjectsOptionsModel.Name = core.StringPtr("testString") listObjectsOptionsModel.Sort = core.StringPtr("testString") @@ -19311,7 +19837,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the ListObjectsOptions model listObjectsOptionsModel := new(catalogmanagementv1.ListObjectsOptions) listObjectsOptionsModel.CatalogIdentifier = core.StringPtr("testString") - listObjectsOptionsModel.Limit = core.Int64Ptr(int64(1000)) + listObjectsOptionsModel.Limit = core.Int64Ptr(int64(10)) listObjectsOptionsModel.Offset = core.Int64Ptr(int64(38)) listObjectsOptionsModel.Name = core.StringPtr("testString") listObjectsOptionsModel.Sort = core.StringPtr("testString") @@ -19329,6 +19855,115 @@ var _ = Describe(`CatalogManagementV1`, func() { testServer.Close() }) }) + Context(`Test pagination helper method on response`, func() { + It(`Invoke GetNextOffset successfully`, func() { + responseObject := new(catalogmanagementv1.ObjectListResult) + responseObject.Next = core.StringPtr("ibm.com?offset=135") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(Equal(core.Int64Ptr(int64(135)))) + }) + It(`Invoke GetNextOffset without a "Next" property in the response`, func() { + responseObject := new(catalogmanagementv1.ObjectListResult) + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset without any query params in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.ObjectListResult) + responseObject.Next = core.StringPtr("ibm.com") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset with a non-integer query param in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.ObjectListResult) + responseObject.Next = core.StringPtr("ibm.com?offset=tiger") + + value, err := responseObject.GetNextOffset() + Expect(err).NotTo(BeNil()) + Expect(value).To(BeNil()) + }) + }) + Context(`Using mock server endpoint - paginated response`, func() { + BeforeEach(func() { + var requestNumber int = 0 + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(listObjectsPath)) + Expect(req.Method).To(Equal("GET")) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + requestNumber++ + if requestNumber == 1 { + fmt.Fprintf(res, "%s", `{"next":"https://myhost.com/somePath?offset=1","total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","name":"Name","crn":"CRN","url":"URL","parent_id":"ParentID","label_i18n":{"mapKey":"Inner"},"label":"Label","tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"kind":"Kind","publish":{"permit_ibm_public_publish":true,"ibm_approved":false,"public_approved":true,"portal_approval_record":"PortalApprovalRecord","portal_url":"PortalURL"},"state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"catalog_id":"CatalogID","catalog_name":"CatalogName","data":{"anyKey":"anyValue"}}]}`) + } else if requestNumber == 2 { + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"resources":[{"id":"ID","_rev":"Rev","name":"Name","crn":"CRN","url":"URL","parent_id":"ParentID","label_i18n":{"mapKey":"Inner"},"label":"Label","tags":["Tags"],"created":"2019-01-01T12:00:00.000Z","updated":"2019-01-01T12:00:00.000Z","short_description":"ShortDescription","short_description_i18n":{"mapKey":"Inner"},"kind":"Kind","publish":{"permit_ibm_public_publish":true,"ibm_approved":false,"public_approved":true,"portal_approval_record":"PortalApprovalRecord","portal_url":"PortalURL"},"state":{"current":"Current","current_entered":"2019-01-01T12:00:00.000Z","pending":"Pending","pending_requested":"2019-01-01T12:00:00.000Z","previous":"Previous"},"catalog_id":"CatalogID","catalog_name":"CatalogName","data":{"anyKey":"anyValue"}}]}`) + } else { + res.WriteHeader(400) + } + })) + }) + It(`Use ObjectsPager.GetNext successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + listObjectsOptionsModel := &catalogmanagementv1.ListObjectsOptions{ + CatalogIdentifier: core.StringPtr("testString"), + Limit: core.Int64Ptr(int64(10)), + Name: core.StringPtr("testString"), + Sort: core.StringPtr("testString"), + } + + pager, err := catalogManagementService.NewObjectsPager(listObjectsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + var allResults []catalogmanagementv1.CatalogObject + for pager.HasNext() { + nextPage, err := pager.GetNext() + Expect(err).To(BeNil()) + Expect(nextPage).ToNot(BeNil()) + allResults = append(allResults, nextPage...) + } + Expect(len(allResults)).To(Equal(2)) + }) + It(`Use ObjectsPager.GetAll successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + listObjectsOptionsModel := &catalogmanagementv1.ListObjectsOptions{ + CatalogIdentifier: core.StringPtr("testString"), + Limit: core.Int64Ptr(int64(10)), + Name: core.StringPtr("testString"), + Sort: core.StringPtr("testString"), + } + + pager, err := catalogManagementService.NewObjectsPager(listObjectsOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + allResults, err := pager.GetAll() + Expect(err).To(BeNil()) + Expect(allResults).ToNot(BeNil()) + Expect(len(allResults)).To(Equal(2)) + }) + }) }) Describe(`CreateObject(createObjectOptions *CreateObjectOptions) - Operation response error`, func() { createObjectPath := "/catalogs/testString/objects" @@ -19372,9 +20007,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateObjectOptions model createObjectOptionsModel := new(catalogmanagementv1.CreateObjectOptions) createObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createObjectOptionsModel.ID = core.StringPtr("testString") createObjectOptionsModel.Name = core.StringPtr("testString") - createObjectOptionsModel.Rev = core.StringPtr("testString") createObjectOptionsModel.CRN = core.StringPtr("testString") createObjectOptionsModel.URL = core.StringPtr("testString") createObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -19390,7 +20023,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createObjectOptionsModel.State = stateModel createObjectOptionsModel.CatalogID = core.StringPtr("testString") createObjectOptionsModel.CatalogName = core.StringPtr("testString") - createObjectOptionsModel.Data = make(map[string]interface{}) + createObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} createObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := catalogManagementService.CreateObject(createObjectOptionsModel) @@ -19443,7 +20076,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}`) })) }) It(`Invoke CreateObject successfully with retries`, func() { @@ -19474,9 +20107,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateObjectOptions model createObjectOptionsModel := new(catalogmanagementv1.CreateObjectOptions) createObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createObjectOptionsModel.ID = core.StringPtr("testString") createObjectOptionsModel.Name = core.StringPtr("testString") - createObjectOptionsModel.Rev = core.StringPtr("testString") createObjectOptionsModel.CRN = core.StringPtr("testString") createObjectOptionsModel.URL = core.StringPtr("testString") createObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -19492,7 +20123,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createObjectOptionsModel.State = stateModel createObjectOptionsModel.CatalogID = core.StringPtr("testString") createObjectOptionsModel.CatalogName = core.StringPtr("testString") - createObjectOptionsModel.Data = make(map[string]interface{}) + createObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} createObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -19548,7 +20179,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}`) })) }) It(`Invoke CreateObject successfully`, func() { @@ -19584,9 +20215,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateObjectOptions model createObjectOptionsModel := new(catalogmanagementv1.CreateObjectOptions) createObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createObjectOptionsModel.ID = core.StringPtr("testString") createObjectOptionsModel.Name = core.StringPtr("testString") - createObjectOptionsModel.Rev = core.StringPtr("testString") createObjectOptionsModel.CRN = core.StringPtr("testString") createObjectOptionsModel.URL = core.StringPtr("testString") createObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -19602,7 +20231,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createObjectOptionsModel.State = stateModel createObjectOptionsModel.CatalogID = core.StringPtr("testString") createObjectOptionsModel.CatalogName = core.StringPtr("testString") - createObjectOptionsModel.Data = make(map[string]interface{}) + createObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} createObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -19639,9 +20268,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateObjectOptions model createObjectOptionsModel := new(catalogmanagementv1.CreateObjectOptions) createObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createObjectOptionsModel.ID = core.StringPtr("testString") createObjectOptionsModel.Name = core.StringPtr("testString") - createObjectOptionsModel.Rev = core.StringPtr("testString") createObjectOptionsModel.CRN = core.StringPtr("testString") createObjectOptionsModel.URL = core.StringPtr("testString") createObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -19657,7 +20284,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createObjectOptionsModel.State = stateModel createObjectOptionsModel.CatalogID = core.StringPtr("testString") createObjectOptionsModel.CatalogName = core.StringPtr("testString") - createObjectOptionsModel.Data = make(map[string]interface{}) + createObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} createObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := catalogManagementService.SetServiceURL("") @@ -19715,9 +20342,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateObjectOptions model createObjectOptionsModel := new(catalogmanagementv1.CreateObjectOptions) createObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - createObjectOptionsModel.ID = core.StringPtr("testString") createObjectOptionsModel.Name = core.StringPtr("testString") - createObjectOptionsModel.Rev = core.StringPtr("testString") createObjectOptionsModel.CRN = core.StringPtr("testString") createObjectOptionsModel.URL = core.StringPtr("testString") createObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -19733,7 +20358,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createObjectOptionsModel.State = stateModel createObjectOptionsModel.CatalogID = core.StringPtr("testString") createObjectOptionsModel.CatalogName = core.StringPtr("testString") - createObjectOptionsModel.Data = make(map[string]interface{}) + createObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} createObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -19812,7 +20437,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}`) })) }) It(`Invoke GetObject successfully with retries`, func() { @@ -19867,7 +20492,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}`) })) }) It(`Invoke GetObject successfully`, func() { @@ -20010,8 +20635,8 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ID = core.StringPtr("testString") - replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.Rev = core.StringPtr("testString") + replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.CRN = core.StringPtr("testString") replaceObjectOptionsModel.URL = core.StringPtr("testString") replaceObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -20027,7 +20652,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.State = stateModel replaceObjectOptionsModel.CatalogID = core.StringPtr("testString") replaceObjectOptionsModel.CatalogName = core.StringPtr("testString") - replaceObjectOptionsModel.Data = make(map[string]interface{}) + replaceObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} replaceObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response result, response, operationErr := catalogManagementService.ReplaceObject(replaceObjectOptionsModel) @@ -20080,7 +20705,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}`) })) }) It(`Invoke ReplaceObject successfully with retries`, func() { @@ -20113,8 +20738,8 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ID = core.StringPtr("testString") - replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.Rev = core.StringPtr("testString") + replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.CRN = core.StringPtr("testString") replaceObjectOptionsModel.URL = core.StringPtr("testString") replaceObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -20130,7 +20755,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.State = stateModel replaceObjectOptionsModel.CatalogID = core.StringPtr("testString") replaceObjectOptionsModel.CatalogName = core.StringPtr("testString") - replaceObjectOptionsModel.Data = make(map[string]interface{}) + replaceObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} replaceObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with a Context to test a timeout error @@ -20186,7 +20811,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "name": "Name", "_rev": "Rev", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"mapKey": "anyValue"}}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "name": "Name", "crn": "CRN", "url": "URL", "parent_id": "ParentID", "label_i18n": {"mapKey": "Inner"}, "label": "Label", "tags": ["Tags"], "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "short_description": "ShortDescription", "short_description_i18n": {"mapKey": "Inner"}, "kind": "Kind", "publish": {"permit_ibm_public_publish": true, "ibm_approved": false, "public_approved": true, "portal_approval_record": "PortalApprovalRecord", "portal_url": "PortalURL"}, "state": {"current": "Current", "current_entered": "2019-01-01T12:00:00.000Z", "pending": "Pending", "pending_requested": "2019-01-01T12:00:00.000Z", "previous": "Previous"}, "catalog_id": "CatalogID", "catalog_name": "CatalogName", "data": {"anyKey": "anyValue"}}`) })) }) It(`Invoke ReplaceObject successfully`, func() { @@ -20224,8 +20849,8 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ID = core.StringPtr("testString") - replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.Rev = core.StringPtr("testString") + replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.CRN = core.StringPtr("testString") replaceObjectOptionsModel.URL = core.StringPtr("testString") replaceObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -20241,7 +20866,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.State = stateModel replaceObjectOptionsModel.CatalogID = core.StringPtr("testString") replaceObjectOptionsModel.CatalogName = core.StringPtr("testString") - replaceObjectOptionsModel.Data = make(map[string]interface{}) + replaceObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} replaceObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with valid options model (positive test) @@ -20280,8 +20905,8 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ID = core.StringPtr("testString") - replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.Rev = core.StringPtr("testString") + replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.CRN = core.StringPtr("testString") replaceObjectOptionsModel.URL = core.StringPtr("testString") replaceObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -20297,7 +20922,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.State = stateModel replaceObjectOptionsModel.CatalogID = core.StringPtr("testString") replaceObjectOptionsModel.CatalogName = core.StringPtr("testString") - replaceObjectOptionsModel.Data = make(map[string]interface{}) + replaceObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} replaceObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) err := catalogManagementService.SetServiceURL("") @@ -20357,8 +20982,8 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") replaceObjectOptionsModel.ID = core.StringPtr("testString") - replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.Rev = core.StringPtr("testString") + replaceObjectOptionsModel.Name = core.StringPtr("testString") replaceObjectOptionsModel.CRN = core.StringPtr("testString") replaceObjectOptionsModel.URL = core.StringPtr("testString") replaceObjectOptionsModel.ParentID = core.StringPtr("testString") @@ -20374,7 +20999,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.State = stateModel replaceObjectOptionsModel.CatalogID = core.StringPtr("testString") replaceObjectOptionsModel.CatalogName = core.StringPtr("testString") - replaceObjectOptionsModel.Data = make(map[string]interface{}) + replaceObjectOptionsModel.Data = map[string]interface{}{"anyKey": "anyValue"} replaceObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation @@ -22062,7 +22687,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Verify the contents of the request Expect(req.URL.EscapedPath()).To(Equal(getObjectAccessListDeprecatedPath)) Expect(req.Method).To(Equal("GET")) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) res.Header().Set("Content-type", "application/json") res.WriteHeader(200) @@ -22081,7 +22706,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getObjectAccessListDeprecatedOptionsModel := new(catalogmanagementv1.GetObjectAccessListDeprecatedOptions) getObjectAccessListDeprecatedOptionsModel.CatalogIdentifier = core.StringPtr("testString") getObjectAccessListDeprecatedOptionsModel.ObjectIdentifier = core.StringPtr("testString") - getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(10)) getObjectAccessListDeprecatedOptionsModel.Offset = core.Int64Ptr(int64(38)) getObjectAccessListDeprecatedOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response @@ -22113,7 +22738,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getObjectAccessListDeprecatedPath)) Expect(req.Method).To(Equal("GET")) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // Sleep a short time to support a timeout test time.Sleep(100 * time.Millisecond) @@ -22137,7 +22762,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getObjectAccessListDeprecatedOptionsModel := new(catalogmanagementv1.GetObjectAccessListDeprecatedOptions) getObjectAccessListDeprecatedOptionsModel.CatalogIdentifier = core.StringPtr("testString") getObjectAccessListDeprecatedOptionsModel.ObjectIdentifier = core.StringPtr("testString") - getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(10)) getObjectAccessListDeprecatedOptionsModel.Offset = core.Int64Ptr(int64(38)) getObjectAccessListDeprecatedOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -22175,7 +22800,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(req.URL.EscapedPath()).To(Equal(getObjectAccessListDeprecatedPath)) Expect(req.Method).To(Equal("GET")) - Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(1000))})) + Expect(req.URL.Query()["limit"]).To(Equal([]string{fmt.Sprint(int64(10))})) Expect(req.URL.Query()["offset"]).To(Equal([]string{fmt.Sprint(int64(38))})) // Set mock response res.Header().Set("Content-type", "application/json") @@ -22201,7 +22826,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getObjectAccessListDeprecatedOptionsModel := new(catalogmanagementv1.GetObjectAccessListDeprecatedOptions) getObjectAccessListDeprecatedOptionsModel.CatalogIdentifier = core.StringPtr("testString") getObjectAccessListDeprecatedOptionsModel.ObjectIdentifier = core.StringPtr("testString") - getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(10)) getObjectAccessListDeprecatedOptionsModel.Offset = core.Int64Ptr(int64(38)) getObjectAccessListDeprecatedOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -22224,7 +22849,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getObjectAccessListDeprecatedOptionsModel := new(catalogmanagementv1.GetObjectAccessListDeprecatedOptions) getObjectAccessListDeprecatedOptionsModel.CatalogIdentifier = core.StringPtr("testString") getObjectAccessListDeprecatedOptionsModel.ObjectIdentifier = core.StringPtr("testString") - getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(1000)) + getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(10)) getObjectAccessListDeprecatedOptionsModel.Offset = core.Int64Ptr(int64(38)) getObjectAccessListDeprecatedOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) @@ -22252,11 +22877,122 @@ var _ = Describe(`CatalogManagementV1`, func() { testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { defer GinkgoRecover() - // Set success status code with no respoonse body - res.WriteHeader(200) - })) + // Set success status code with no respoonse body + res.WriteHeader(200) + })) + }) + It(`Invoke GetObjectAccessListDeprecated successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + // Construct an instance of the GetObjectAccessListDeprecatedOptions model + getObjectAccessListDeprecatedOptionsModel := new(catalogmanagementv1.GetObjectAccessListDeprecatedOptions) + getObjectAccessListDeprecatedOptionsModel.CatalogIdentifier = core.StringPtr("testString") + getObjectAccessListDeprecatedOptionsModel.ObjectIdentifier = core.StringPtr("testString") + getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(10)) + getObjectAccessListDeprecatedOptionsModel.Offset = core.Int64Ptr(int64(38)) + getObjectAccessListDeprecatedOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + + // Invoke operation + result, response, operationErr := catalogManagementService.GetObjectAccessListDeprecated(getObjectAccessListDeprecatedOptionsModel) + Expect(operationErr).To(BeNil()) + Expect(response).ToNot(BeNil()) + + // Verify a nil result + Expect(result).To(BeNil()) + }) + AfterEach(func() { + testServer.Close() + }) + }) + Context(`Test pagination helper method on response`, func() { + It(`Invoke GetNextOffset successfully`, func() { + responseObject := new(catalogmanagementv1.ObjectAccessListResult) + responseObject.Next = core.StringPtr("ibm.com?offset=135") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(Equal(core.Int64Ptr(int64(135)))) + }) + It(`Invoke GetNextOffset without a "Next" property in the response`, func() { + responseObject := new(catalogmanagementv1.ObjectAccessListResult) + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset without any query params in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.ObjectAccessListResult) + responseObject.Next = core.StringPtr("ibm.com") + + value, err := responseObject.GetNextOffset() + Expect(err).To(BeNil()) + Expect(value).To(BeNil()) + }) + It(`Invoke GetNextOffset with a non-integer query param in the "Next" URL`, func() { + responseObject := new(catalogmanagementv1.ObjectAccessListResult) + responseObject.Next = core.StringPtr("ibm.com?offset=tiger") + + value, err := responseObject.GetNextOffset() + Expect(err).NotTo(BeNil()) + Expect(value).To(BeNil()) + }) + }) + Context(`Using mock server endpoint - paginated response`, func() { + BeforeEach(func() { + var requestNumber int = 0 + testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + defer GinkgoRecover() + + // Verify the contents of the request + Expect(req.URL.EscapedPath()).To(Equal(getObjectAccessListDeprecatedPath)) + Expect(req.Method).To(Equal("GET")) + + // Set mock response + res.Header().Set("Content-type", "application/json") + res.WriteHeader(200) + requestNumber++ + if requestNumber == 1 { + fmt.Fprintf(res, "%s", `{"next":"https://myhost.com/somePath?offset=1","total_count":2,"limit":1,"resources":[{"id":"ID","account":"Account","account_type":11,"catalog_id":"CatalogID","target_id":"TargetID","target_account":"TargetAccount","target_kind":"TargetKind","private_accessible":false,"created":"2019-01-01T12:00:00.000Z"}]}`) + } else if requestNumber == 2 { + fmt.Fprintf(res, "%s", `{"total_count":2,"limit":1,"resources":[{"id":"ID","account":"Account","account_type":11,"catalog_id":"CatalogID","target_id":"TargetID","target_account":"TargetAccount","target_kind":"TargetKind","private_accessible":false,"created":"2019-01-01T12:00:00.000Z"}]}`) + } else { + res.WriteHeader(400) + } + })) + }) + It(`Use GetObjectAccessListDeprecatedPager.GetNext successfully`, func() { + catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ + URL: testServer.URL, + Authenticator: &core.NoAuthAuthenticator{}, + }) + Expect(serviceErr).To(BeNil()) + Expect(catalogManagementService).ToNot(BeNil()) + + getObjectAccessListDeprecatedOptionsModel := &catalogmanagementv1.GetObjectAccessListDeprecatedOptions{ + CatalogIdentifier: core.StringPtr("testString"), + ObjectIdentifier: core.StringPtr("testString"), + Limit: core.Int64Ptr(int64(10)), + } + + pager, err := catalogManagementService.NewGetObjectAccessListDeprecatedPager(getObjectAccessListDeprecatedOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) + + var allResults []catalogmanagementv1.Access + for pager.HasNext() { + nextPage, err := pager.GetNext() + Expect(err).To(BeNil()) + Expect(nextPage).ToNot(BeNil()) + allResults = append(allResults, nextPage...) + } + Expect(len(allResults)).To(Equal(2)) }) - It(`Invoke GetObjectAccessListDeprecated successfully`, func() { + It(`Use GetObjectAccessListDeprecatedPager.GetAll successfully`, func() { catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ URL: testServer.URL, Authenticator: &core.NoAuthAuthenticator{}, @@ -22264,24 +23000,20 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(serviceErr).To(BeNil()) Expect(catalogManagementService).ToNot(BeNil()) - // Construct an instance of the GetObjectAccessListDeprecatedOptions model - getObjectAccessListDeprecatedOptionsModel := new(catalogmanagementv1.GetObjectAccessListDeprecatedOptions) - getObjectAccessListDeprecatedOptionsModel.CatalogIdentifier = core.StringPtr("testString") - getObjectAccessListDeprecatedOptionsModel.ObjectIdentifier = core.StringPtr("testString") - getObjectAccessListDeprecatedOptionsModel.Limit = core.Int64Ptr(int64(1000)) - getObjectAccessListDeprecatedOptionsModel.Offset = core.Int64Ptr(int64(38)) - getObjectAccessListDeprecatedOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} + getObjectAccessListDeprecatedOptionsModel := &catalogmanagementv1.GetObjectAccessListDeprecatedOptions{ + CatalogIdentifier: core.StringPtr("testString"), + ObjectIdentifier: core.StringPtr("testString"), + Limit: core.Int64Ptr(int64(10)), + } - // Invoke operation - result, response, operationErr := catalogManagementService.GetObjectAccessListDeprecated(getObjectAccessListDeprecatedOptionsModel) - Expect(operationErr).To(BeNil()) - Expect(response).ToNot(BeNil()) + pager, err := catalogManagementService.NewGetObjectAccessListDeprecatedPager(getObjectAccessListDeprecatedOptionsModel) + Expect(err).To(BeNil()) + Expect(pager).ToNot(BeNil()) - // Verify a nil result - Expect(result).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() + allResults, err := pager.GetAll() + Expect(err).To(BeNil()) + Expect(allResults).ToNot(BeNil()) + Expect(len(allResults)).To(Equal(2)) }) }) }) @@ -22793,286 +23525,6 @@ var _ = Describe(`CatalogManagementV1`, func() { }) }) }) - Describe(`AccountPublishObject(accountPublishObjectOptions *AccountPublishObjectOptions)`, func() { - accountPublishObjectPath := "/catalogs/testString/objects/testString/account-publish" - Context(`Using mock server endpoint`, func() { - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - defer GinkgoRecover() - - // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(accountPublishObjectPath)) - Expect(req.Method).To(Equal("POST")) - - res.WriteHeader(202) - })) - }) - It(`Invoke AccountPublishObject successfully`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Invoke operation with nil options model (negative test) - response, operationErr := catalogManagementService.AccountPublishObject(nil) - Expect(operationErr).NotTo(BeNil()) - Expect(response).To(BeNil()) - - // Construct an instance of the AccountPublishObjectOptions model - accountPublishObjectOptionsModel := new(catalogmanagementv1.AccountPublishObjectOptions) - accountPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - accountPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - accountPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - - // Invoke operation with valid options model (positive test) - response, operationErr = catalogManagementService.AccountPublishObject(accountPublishObjectOptionsModel) - Expect(operationErr).To(BeNil()) - Expect(response).ToNot(BeNil()) - }) - It(`Invoke AccountPublishObject with error: Operation validation and request error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Construct an instance of the AccountPublishObjectOptions model - accountPublishObjectOptionsModel := new(catalogmanagementv1.AccountPublishObjectOptions) - accountPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - accountPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - accountPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Invoke operation with empty URL (negative test) - err := catalogManagementService.SetServiceURL("") - Expect(err).To(BeNil()) - response, operationErr := catalogManagementService.AccountPublishObject(accountPublishObjectOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) - Expect(response).To(BeNil()) - // Construct a second instance of the AccountPublishObjectOptions model with no property values - accountPublishObjectOptionsModelNew := new(catalogmanagementv1.AccountPublishObjectOptions) - // Invoke operation with invalid model (negative test) - response, operationErr = catalogManagementService.AccountPublishObject(accountPublishObjectOptionsModelNew) - Expect(operationErr).ToNot(BeNil()) - Expect(response).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() - }) - }) - }) - Describe(`SharedPublishObject(sharedPublishObjectOptions *SharedPublishObjectOptions)`, func() { - sharedPublishObjectPath := "/catalogs/testString/objects/testString/shared-publish" - Context(`Using mock server endpoint`, func() { - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - defer GinkgoRecover() - - // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(sharedPublishObjectPath)) - Expect(req.Method).To(Equal("POST")) - - res.WriteHeader(202) - })) - }) - It(`Invoke SharedPublishObject successfully`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Invoke operation with nil options model (negative test) - response, operationErr := catalogManagementService.SharedPublishObject(nil) - Expect(operationErr).NotTo(BeNil()) - Expect(response).To(BeNil()) - - // Construct an instance of the SharedPublishObjectOptions model - sharedPublishObjectOptionsModel := new(catalogmanagementv1.SharedPublishObjectOptions) - sharedPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - sharedPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - sharedPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - - // Invoke operation with valid options model (positive test) - response, operationErr = catalogManagementService.SharedPublishObject(sharedPublishObjectOptionsModel) - Expect(operationErr).To(BeNil()) - Expect(response).ToNot(BeNil()) - }) - It(`Invoke SharedPublishObject with error: Operation validation and request error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Construct an instance of the SharedPublishObjectOptions model - sharedPublishObjectOptionsModel := new(catalogmanagementv1.SharedPublishObjectOptions) - sharedPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - sharedPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - sharedPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Invoke operation with empty URL (negative test) - err := catalogManagementService.SetServiceURL("") - Expect(err).To(BeNil()) - response, operationErr := catalogManagementService.SharedPublishObject(sharedPublishObjectOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) - Expect(response).To(BeNil()) - // Construct a second instance of the SharedPublishObjectOptions model with no property values - sharedPublishObjectOptionsModelNew := new(catalogmanagementv1.SharedPublishObjectOptions) - // Invoke operation with invalid model (negative test) - response, operationErr = catalogManagementService.SharedPublishObject(sharedPublishObjectOptionsModelNew) - Expect(operationErr).ToNot(BeNil()) - Expect(response).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() - }) - }) - }) - Describe(`IBMPublishObject(ibmPublishObjectOptions *IBMPublishObjectOptions)`, func() { - ibmPublishObjectPath := "/catalogs/testString/objects/testString/ibm-publish" - Context(`Using mock server endpoint`, func() { - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - defer GinkgoRecover() - - // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(ibmPublishObjectPath)) - Expect(req.Method).To(Equal("POST")) - - res.WriteHeader(202) - })) - }) - It(`Invoke IBMPublishObject successfully`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Invoke operation with nil options model (negative test) - response, operationErr := catalogManagementService.IBMPublishObject(nil) - Expect(operationErr).NotTo(BeNil()) - Expect(response).To(BeNil()) - - // Construct an instance of the IBMPublishObjectOptions model - ibmPublishObjectOptionsModel := new(catalogmanagementv1.IBMPublishObjectOptions) - ibmPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - ibmPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - ibmPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - - // Invoke operation with valid options model (positive test) - response, operationErr = catalogManagementService.IBMPublishObject(ibmPublishObjectOptionsModel) - Expect(operationErr).To(BeNil()) - Expect(response).ToNot(BeNil()) - }) - It(`Invoke IBMPublishObject with error: Operation validation and request error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Construct an instance of the IBMPublishObjectOptions model - ibmPublishObjectOptionsModel := new(catalogmanagementv1.IBMPublishObjectOptions) - ibmPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - ibmPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - ibmPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Invoke operation with empty URL (negative test) - err := catalogManagementService.SetServiceURL("") - Expect(err).To(BeNil()) - response, operationErr := catalogManagementService.IBMPublishObject(ibmPublishObjectOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) - Expect(response).To(BeNil()) - // Construct a second instance of the IBMPublishObjectOptions model with no property values - ibmPublishObjectOptionsModelNew := new(catalogmanagementv1.IBMPublishObjectOptions) - // Invoke operation with invalid model (negative test) - response, operationErr = catalogManagementService.IBMPublishObject(ibmPublishObjectOptionsModelNew) - Expect(operationErr).ToNot(BeNil()) - Expect(response).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() - }) - }) - }) - Describe(`PublicPublishObject(publicPublishObjectOptions *PublicPublishObjectOptions)`, func() { - publicPublishObjectPath := "/catalogs/testString/objects/testString/public-publish" - Context(`Using mock server endpoint`, func() { - BeforeEach(func() { - testServer = httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - defer GinkgoRecover() - - // Verify the contents of the request - Expect(req.URL.EscapedPath()).To(Equal(publicPublishObjectPath)) - Expect(req.Method).To(Equal("POST")) - - res.WriteHeader(202) - })) - }) - It(`Invoke PublicPublishObject successfully`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Invoke operation with nil options model (negative test) - response, operationErr := catalogManagementService.PublicPublishObject(nil) - Expect(operationErr).NotTo(BeNil()) - Expect(response).To(BeNil()) - - // Construct an instance of the PublicPublishObjectOptions model - publicPublishObjectOptionsModel := new(catalogmanagementv1.PublicPublishObjectOptions) - publicPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - publicPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - publicPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - - // Invoke operation with valid options model (positive test) - response, operationErr = catalogManagementService.PublicPublishObject(publicPublishObjectOptionsModel) - Expect(operationErr).To(BeNil()) - Expect(response).ToNot(BeNil()) - }) - It(`Invoke PublicPublishObject with error: Operation validation and request error`, func() { - catalogManagementService, serviceErr := catalogmanagementv1.NewCatalogManagementV1(&catalogmanagementv1.CatalogManagementV1Options{ - URL: testServer.URL, - Authenticator: &core.NoAuthAuthenticator{}, - }) - Expect(serviceErr).To(BeNil()) - Expect(catalogManagementService).ToNot(BeNil()) - - // Construct an instance of the PublicPublishObjectOptions model - publicPublishObjectOptionsModel := new(catalogmanagementv1.PublicPublishObjectOptions) - publicPublishObjectOptionsModel.CatalogIdentifier = core.StringPtr("testString") - publicPublishObjectOptionsModel.ObjectIdentifier = core.StringPtr("testString") - publicPublishObjectOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} - // Invoke operation with empty URL (negative test) - err := catalogManagementService.SetServiceURL("") - Expect(err).To(BeNil()) - response, operationErr := catalogManagementService.PublicPublishObject(publicPublishObjectOptionsModel) - Expect(operationErr).ToNot(BeNil()) - Expect(operationErr.Error()).To(ContainSubstring(core.ERRORMSG_SERVICE_URL_MISSING)) - Expect(response).To(BeNil()) - // Construct a second instance of the PublicPublishObjectOptions model with no property values - publicPublishObjectOptionsModelNew := new(catalogmanagementv1.PublicPublishObjectOptions) - // Invoke operation with invalid model (negative test) - response, operationErr = catalogManagementService.PublicPublishObject(publicPublishObjectOptionsModelNew) - Expect(operationErr).ToNot(BeNil()) - Expect(response).To(BeNil()) - }) - AfterEach(func() { - testServer.Close() - }) - }) - }) Describe(`CreateOfferingInstance(createOfferingInstanceOptions *CreateOfferingInstanceOptions) - Operation response error`, func() { createOfferingInstancePath := "/instances/offerings" Context(`Using mock server endpoint with invalid JSON response`, func() { @@ -23129,7 +23581,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") createOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") createOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - createOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + createOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") createOfferingInstanceOptionsModel.Location = core.StringPtr("testString") createOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -23191,7 +23643,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"mapKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"anyKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) })) }) It(`Invoke CreateOfferingInstance successfully with retries`, func() { @@ -23234,7 +23686,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") createOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") createOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - createOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + createOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") createOfferingInstanceOptionsModel.Location = core.StringPtr("testString") createOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -23299,7 +23751,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(201) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"mapKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"anyKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) })) }) It(`Invoke CreateOfferingInstance successfully`, func() { @@ -23347,7 +23799,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") createOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") createOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - createOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + createOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") createOfferingInstanceOptionsModel.Location = core.StringPtr("testString") createOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -23403,7 +23855,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") createOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") createOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - createOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + createOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") createOfferingInstanceOptionsModel.Location = core.StringPtr("testString") createOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -23480,7 +23932,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") createOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") createOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - createOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + createOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} createOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") createOfferingInstanceOptionsModel.Location = core.StringPtr("testString") createOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -23565,7 +24017,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"mapKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"anyKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) })) }) It(`Invoke GetOfferingInstance successfully with retries`, func() { @@ -23619,7 +24071,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"mapKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"anyKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) })) }) It(`Invoke GetOfferingInstance successfully`, func() { @@ -23772,7 +24224,7 @@ var _ = Describe(`CatalogManagementV1`, func() { putOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") putOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") putOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - putOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + putOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} putOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") putOfferingInstanceOptionsModel.Location = core.StringPtr("testString") putOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -23834,7 +24286,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"mapKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"anyKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) })) }) It(`Invoke PutOfferingInstance successfully with retries`, func() { @@ -23878,7 +24330,7 @@ var _ = Describe(`CatalogManagementV1`, func() { putOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") putOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") putOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - putOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + putOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} putOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") putOfferingInstanceOptionsModel.Location = core.StringPtr("testString") putOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -23943,7 +24395,7 @@ var _ = Describe(`CatalogManagementV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"mapKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) + fmt.Fprintf(res, "%s", `{"id": "ID", "_rev": "Rev", "url": "URL", "crn": "CRN", "label": "Label", "catalog_id": "CatalogID", "offering_id": "OfferingID", "kind_format": "KindFormat", "version": "Version", "version_id": "VersionID", "cluster_id": "ClusterID", "cluster_region": "ClusterRegion", "cluster_namespaces": ["ClusterNamespaces"], "cluster_all_namespaces": true, "schematics_workspace_id": "SchematicsWorkspaceID", "install_plan": "InstallPlan", "channel": "Channel", "created": "2019-01-01T12:00:00.000Z", "updated": "2019-01-01T12:00:00.000Z", "metadata": {"anyKey": "anyValue"}, "resource_group_id": "ResourceGroupID", "location": "Location", "disabled": true, "account": "Account", "last_operation": {"operation": "Operation", "state": "State", "message": "Message", "transaction_id": "TransactionID", "updated": "2019-01-01T12:00:00.000Z", "code": "Code"}, "kind_target": "KindTarget", "sha": "Sha"}`) })) }) It(`Invoke PutOfferingInstance successfully`, func() { @@ -23992,7 +24444,7 @@ var _ = Describe(`CatalogManagementV1`, func() { putOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") putOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") putOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - putOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + putOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} putOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") putOfferingInstanceOptionsModel.Location = core.StringPtr("testString") putOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -24049,7 +24501,7 @@ var _ = Describe(`CatalogManagementV1`, func() { putOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") putOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") putOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - putOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + putOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} putOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") putOfferingInstanceOptionsModel.Location = core.StringPtr("testString") putOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -24127,7 +24579,7 @@ var _ = Describe(`CatalogManagementV1`, func() { putOfferingInstanceOptionsModel.Channel = core.StringPtr("testString") putOfferingInstanceOptionsModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") putOfferingInstanceOptionsModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") - putOfferingInstanceOptionsModel.Metadata = make(map[string]interface{}) + putOfferingInstanceOptionsModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} putOfferingInstanceOptionsModel.ResourceGroupID = core.StringPtr("testString") putOfferingInstanceOptionsModel.Location = core.StringPtr("testString") putOfferingInstanceOptionsModel.Disabled = core.BoolPtr(true) @@ -24782,29 +25234,6 @@ var _ = Describe(`CatalogManagementV1`, func() { URL: "http://catalogmanagementv1modelgenerator.com", Authenticator: &core.NoAuthAuthenticator{}, }) - It(`Invoke NewAccountPublishObjectOptions successfully`, func() { - // Construct an instance of the AccountPublishObjectOptions model - catalogIdentifier := "testString" - objectIdentifier := "testString" - accountPublishObjectOptionsModel := catalogManagementService.NewAccountPublishObjectOptions(catalogIdentifier, objectIdentifier) - accountPublishObjectOptionsModel.SetCatalogIdentifier("testString") - accountPublishObjectOptionsModel.SetObjectIdentifier("testString") - accountPublishObjectOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(accountPublishObjectOptionsModel).ToNot(BeNil()) - Expect(accountPublishObjectOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(accountPublishObjectOptionsModel.ObjectIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(accountPublishObjectOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewAccountPublishVersionOptions successfully`, func() { - // Construct an instance of the AccountPublishVersionOptions model - versionLocID := "testString" - accountPublishVersionOptionsModel := catalogManagementService.NewAccountPublishVersionOptions(versionLocID) - accountPublishVersionOptionsModel.SetVersionLocID("testString") - accountPublishVersionOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(accountPublishVersionOptionsModel).ToNot(BeNil()) - Expect(accountPublishVersionOptionsModel.VersionLocID).To(Equal(core.StringPtr("testString"))) - Expect(accountPublishVersionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) It(`Invoke NewAddObjectAccessListOptions successfully`, func() { // Construct an instance of the AddObjectAccessListOptions model catalogIdentifier := "testString" @@ -25026,13 +25455,12 @@ var _ = Describe(`CatalogManagementV1`, func() { // Construct an instance of the CreateCatalogOptions model createCatalogOptionsModel := catalogManagementService.NewCreateCatalogOptions() - createCatalogOptionsModel.SetID("testString") - createCatalogOptionsModel.SetRev("testString") createCatalogOptionsModel.SetLabel("testString") createCatalogOptionsModel.SetLabelI18n(make(map[string]string)) createCatalogOptionsModel.SetShortDescription("testString") createCatalogOptionsModel.SetShortDescriptionI18n(make(map[string]string)) createCatalogOptionsModel.SetCatalogIconURL("testString") + createCatalogOptionsModel.SetCatalogBannerURL("testString") createCatalogOptionsModel.SetTags([]string{"testString"}) createCatalogOptionsModel.SetFeatures([]catalogmanagementv1.Feature{*featureModel}) createCatalogOptionsModel.SetDisabled(true) @@ -25041,16 +25469,15 @@ var _ = Describe(`CatalogManagementV1`, func() { createCatalogOptionsModel.SetCatalogFilters(filtersModel) createCatalogOptionsModel.SetSyndicationSettings(syndicationResourceModel) createCatalogOptionsModel.SetKind("testString") - createCatalogOptionsModel.SetMetadata(make(map[string]interface{})) + createCatalogOptionsModel.SetMetadata(map[string]interface{}{"anyKey": "anyValue"}) createCatalogOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createCatalogOptionsModel).ToNot(BeNil()) - Expect(createCatalogOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(createCatalogOptionsModel.Rev).To(Equal(core.StringPtr("testString"))) Expect(createCatalogOptionsModel.Label).To(Equal(core.StringPtr("testString"))) Expect(createCatalogOptionsModel.LabelI18n).To(Equal(make(map[string]string))) Expect(createCatalogOptionsModel.ShortDescription).To(Equal(core.StringPtr("testString"))) Expect(createCatalogOptionsModel.ShortDescriptionI18n).To(Equal(make(map[string]string))) Expect(createCatalogOptionsModel.CatalogIconURL).To(Equal(core.StringPtr("testString"))) + Expect(createCatalogOptionsModel.CatalogBannerURL).To(Equal(core.StringPtr("testString"))) Expect(createCatalogOptionsModel.Tags).To(Equal([]string{"testString"})) Expect(createCatalogOptionsModel.Features).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(createCatalogOptionsModel.Disabled).To(Equal(core.BoolPtr(true))) @@ -25059,7 +25486,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(createCatalogOptionsModel.CatalogFilters).To(Equal(filtersModel)) Expect(createCatalogOptionsModel.SyndicationSettings).To(Equal(syndicationResourceModel)) Expect(createCatalogOptionsModel.Kind).To(Equal(core.StringPtr("testString"))) - Expect(createCatalogOptionsModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(createCatalogOptionsModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(createCatalogOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateObjectAccessOptions successfully`, func() { @@ -25111,9 +25538,7 @@ var _ = Describe(`CatalogManagementV1`, func() { catalogIdentifier := "testString" createObjectOptionsModel := catalogManagementService.NewCreateObjectOptions(catalogIdentifier) createObjectOptionsModel.SetCatalogIdentifier("testString") - createObjectOptionsModel.SetID("testString") createObjectOptionsModel.SetName("testString") - createObjectOptionsModel.SetRev("testString") createObjectOptionsModel.SetCRN("testString") createObjectOptionsModel.SetURL("testString") createObjectOptionsModel.SetParentID("testString") @@ -25129,13 +25554,11 @@ var _ = Describe(`CatalogManagementV1`, func() { createObjectOptionsModel.SetState(stateModel) createObjectOptionsModel.SetCatalogID("testString") createObjectOptionsModel.SetCatalogName("testString") - createObjectOptionsModel.SetData(make(map[string]interface{})) + createObjectOptionsModel.SetData(map[string]interface{}{"anyKey": "anyValue"}) createObjectOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createObjectOptionsModel).ToNot(BeNil()) Expect(createObjectOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(createObjectOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(createObjectOptionsModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(createObjectOptionsModel.Rev).To(Equal(core.StringPtr("testString"))) Expect(createObjectOptionsModel.CRN).To(Equal(core.StringPtr("testString"))) Expect(createObjectOptionsModel.URL).To(Equal(core.StringPtr("testString"))) Expect(createObjectOptionsModel.ParentID).To(Equal(core.StringPtr("testString"))) @@ -25151,7 +25574,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(createObjectOptionsModel.State).To(Equal(stateModel)) Expect(createObjectOptionsModel.CatalogID).To(Equal(core.StringPtr("testString"))) Expect(createObjectOptionsModel.CatalogName).To(Equal(core.StringPtr("testString"))) - Expect(createObjectOptionsModel.Data).To(Equal(make(map[string]interface{}))) + Expect(createObjectOptionsModel.Data).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(createObjectOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewCreateOfferingInstanceOptions successfully`, func() { @@ -25194,7 +25617,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingInstanceOptionsModel.SetChannel("testString") createOfferingInstanceOptionsModel.SetCreated(CreateMockDateTime("2019-01-01T12:00:00.000Z")) createOfferingInstanceOptionsModel.SetUpdated(CreateMockDateTime("2019-01-01T12:00:00.000Z")) - createOfferingInstanceOptionsModel.SetMetadata(make(map[string]interface{})) + createOfferingInstanceOptionsModel.SetMetadata(map[string]interface{}{"anyKey": "anyValue"}) createOfferingInstanceOptionsModel.SetResourceGroupID("testString") createOfferingInstanceOptionsModel.SetLocation("testString") createOfferingInstanceOptionsModel.SetDisabled(true) @@ -25224,7 +25647,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(createOfferingInstanceOptionsModel.Channel).To(Equal(core.StringPtr("testString"))) Expect(createOfferingInstanceOptionsModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(createOfferingInstanceOptionsModel.Updated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) - Expect(createOfferingInstanceOptionsModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(createOfferingInstanceOptionsModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(createOfferingInstanceOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(createOfferingInstanceOptionsModel.Location).To(Equal(core.StringPtr("testString"))) Expect(createOfferingInstanceOptionsModel.Disabled).To(Equal(core.BoolPtr(true))) @@ -25362,13 +25785,13 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") Expect(validationModel.Validated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(validationModel.Requested).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(validationModel.State).To(Equal(core.StringPtr("testString"))) Expect(validationModel.LastOperation).To(Equal(core.StringPtr("testString"))) - Expect(validationModel.Target).To(Equal(make(map[string]interface{}))) + Expect(validationModel.Target).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(validationModel.Message).To(Equal(core.StringPtr("testString"))) // Construct an instance of the Resource model @@ -25505,12 +25928,12 @@ var _ = Describe(`CatalogManagementV1`, func() { costResourceModel := new(catalogmanagementv1.CostResource) Expect(costResourceModel).ToNot(BeNil()) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} Expect(costResourceModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(costResourceModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(costResourceModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(costResourceModel.HourlyCost).To(Equal(core.StringPtr("testString"))) Expect(costResourceModel.MonthlyCost).To(Equal(core.StringPtr("testString"))) Expect(costResourceModel.CostComponents).To(Equal([]catalogmanagementv1.CostComponent{*costComponentModel})) @@ -25519,10 +25942,10 @@ var _ = Describe(`CatalogManagementV1`, func() { costBreakdownModel := new(catalogmanagementv1.CostBreakdown) Expect(costBreakdownModel).ToNot(BeNil()) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} Expect(costBreakdownModel.TotalHourlyCost).To(Equal(core.StringPtr("testString"))) - Expect(costBreakdownModel.TotalMonthlyCOst).To(Equal(core.StringPtr("testString"))) + Expect(costBreakdownModel.TotalMonthlyCost).To(Equal(core.StringPtr("testString"))) Expect(costBreakdownModel.Resources).To(Equal([]catalogmanagementv1.CostResource{*costResourceModel})) // Construct an instance of the CostSummary model @@ -25547,13 +25970,13 @@ var _ = Describe(`CatalogManagementV1`, func() { projectModel := new(catalogmanagementv1.Project) Expect(projectModel).ToNot(BeNil()) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel projectModel.Summary = costSummaryModel Expect(projectModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(projectModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(projectModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(projectModel.PastBreakdown).To(Equal(costBreakdownModel)) Expect(projectModel.Breakdown).To(Equal(costBreakdownModel)) Expect(projectModel.Diff).To(Equal(costBreakdownModel)) @@ -25585,19 +26008,21 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(costEstimateModel.DiffTotalMonthlyCost).To(Equal(core.StringPtr("testString"))) Expect(costEstimateModel.TimeGenerated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - Expect(dependencyModel).ToNot(BeNil()) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} - Expect(dependencyModel.CatalogID).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.Version).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.Flavors).To(Equal([]string{"testString"})) + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + Expect(offeringReferenceModel).ToNot(BeNil()) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} + Expect(offeringReferenceModel.CatalogID).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Name).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Kind).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Version).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Flavors).To(Equal([]string{"testString"})) // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) @@ -25605,17 +26030,63 @@ var _ = Describe(`CatalogManagementV1`, func() { solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} Expect(solutionInfoModel.ArchitectureDiagrams).To(Equal([]catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel})) Expect(solutionInfoModel.Features).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(solutionInfoModel.CostEstimate).To(Equal(costEstimateModel)) - Expect(solutionInfoModel.Dependencies).To(Equal([]catalogmanagementv1.Dependency{*dependencyModel})) + Expect(solutionInfoModel.Dependencies).To(Equal([]catalogmanagementv1.OfferingReference{*offeringReferenceModel})) + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + Expect(complianceControlSccProfileModel).ToNot(BeNil()) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + Expect(complianceControlSccProfileModel.Type).To(Equal(core.StringPtr("testString"))) + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + Expect(complianceControlFamilyModel).ToNot(BeNil()) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + Expect(complianceControlFamilyModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(complianceControlFamilyModel.ExternalID).To(Equal(core.StringPtr("testString"))) + Expect(complianceControlFamilyModel.Description).To(Equal(core.StringPtr("testString"))) + Expect(complianceControlFamilyModel.UIHref).To(Equal(core.StringPtr("testString"))) + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + Expect(goalModel).ToNot(BeNil()) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + Expect(goalModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(goalModel.Description).To(Equal(core.StringPtr("testString"))) + Expect(goalModel.UIHref).To(Equal(core.StringPtr("testString"))) + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + Expect(complianceControlValidationModel).ToNot(BeNil()) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + Expect(complianceControlValidationModel.Certified).To(Equal(core.BoolPtr(true))) + Expect(complianceControlValidationModel.Results).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + Expect(complianceControlModel).ToNot(BeNil()) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel + Expect(complianceControlModel.SccProfile).To(Equal(complianceControlSccProfileModel)) + Expect(complianceControlModel.Family).To(Equal(complianceControlFamilyModel)) + Expect(complianceControlModel.Goals).To(Equal([]catalogmanagementv1.Goal{*goalModel})) + Expect(complianceControlModel.Validation).To(Equal(complianceControlValidationModel)) // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) Expect(versionModel).ToNot(BeNil()) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -25632,7 +26103,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -25652,8 +26123,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) - Expect(versionModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(versionModel.Rev).To(Equal(core.StringPtr("testString"))) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} Expect(versionModel.CRN).To(Equal(core.StringPtr("testString"))) Expect(versionModel.Version).To(Equal(core.StringPtr("testString"))) Expect(versionModel.Flavor).To(Equal(flavorModel)) @@ -25670,7 +26140,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(versionModel.Configuration).To(Equal([]catalogmanagementv1.Configuration{*configurationModel})) Expect(versionModel.Outputs).To(Equal([]catalogmanagementv1.Output{*outputModel})) Expect(versionModel.IamPermissions).To(Equal([]catalogmanagementv1.IamPermission{*iamPermissionModel})) - Expect(versionModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(versionModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(versionModel.Validation).To(Equal(validationModel)) Expect(versionModel.RequiredResources).To(Equal([]catalogmanagementv1.Resource{*resourceModel})) Expect(versionModel.SingleInstance).To(Equal(core.BoolPtr(true))) @@ -25690,6 +26160,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(versionModel.DeprecatePending).To(Equal(deprecatePendingModel)) Expect(versionModel.SolutionInfo).To(Equal(solutionInfoModel)) Expect(versionModel.IsConsumable).To(Equal(core.BoolPtr(true))) + Expect(versionModel.Compliance).To(Equal([]catalogmanagementv1.ComplianceControl{*complianceControlModel})) // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -25699,7 +26170,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -25708,7 +26179,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(deploymentModel.Name).To(Equal(core.StringPtr("testString"))) Expect(deploymentModel.ShortDescription).To(Equal(core.StringPtr("testString"))) Expect(deploymentModel.LongDescription).To(Equal(core.StringPtr("testString"))) - Expect(deploymentModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(deploymentModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(deploymentModel.Tags).To(Equal([]string{"testString"})) Expect(deploymentModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(deploymentModel.Updated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) @@ -25721,7 +26192,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -25732,7 +26203,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(planModel.Name).To(Equal(core.StringPtr("testString"))) Expect(planModel.ShortDescription).To(Equal(core.StringPtr("testString"))) Expect(planModel.LongDescription).To(Equal(core.StringPtr("testString"))) - Expect(planModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(planModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(planModel.Tags).To(Equal([]string{"testString"})) Expect(planModel.AdditionalFeatures).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(planModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) @@ -25746,7 +26217,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -25757,7 +26228,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(kindModel.FormatKind).To(Equal(core.StringPtr("testString"))) Expect(kindModel.InstallKind).To(Equal(core.StringPtr("testString"))) Expect(kindModel.TargetKind).To(Equal(core.StringPtr("testString"))) - Expect(kindModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(kindModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(kindModel.Tags).To(Equal([]string{"testString"})) Expect(kindModel.AdditionalFeatures).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(kindModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) @@ -25903,8 +26374,6 @@ var _ = Describe(`CatalogManagementV1`, func() { catalogIdentifier := "testString" createOfferingOptionsModel := catalogManagementService.NewCreateOfferingOptions(catalogIdentifier) createOfferingOptionsModel.SetCatalogIdentifier("testString") - createOfferingOptionsModel.SetID("testString") - createOfferingOptionsModel.SetRev("testString") createOfferingOptionsModel.SetURL("testString") createOfferingOptionsModel.SetCRN("testString") createOfferingOptionsModel.SetLabel("testString") @@ -25938,7 +26407,7 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingOptionsModel.SetPortalUIURL("testString") createOfferingOptionsModel.SetCatalogID("testString") createOfferingOptionsModel.SetCatalogName("testString") - createOfferingOptionsModel.SetMetadata(make(map[string]interface{})) + createOfferingOptionsModel.SetMetadata(map[string]interface{}{"anyKey": "anyValue"}) createOfferingOptionsModel.SetDisclaimer("testString") createOfferingOptionsModel.SetHidden(true) createOfferingOptionsModel.SetProvider("testString") @@ -25953,8 +26422,6 @@ var _ = Describe(`CatalogManagementV1`, func() { createOfferingOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createOfferingOptionsModel).ToNot(BeNil()) Expect(createOfferingOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(createOfferingOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(createOfferingOptionsModel.Rev).To(Equal(core.StringPtr("testString"))) Expect(createOfferingOptionsModel.URL).To(Equal(core.StringPtr("testString"))) Expect(createOfferingOptionsModel.CRN).To(Equal(core.StringPtr("testString"))) Expect(createOfferingOptionsModel.Label).To(Equal(core.StringPtr("testString"))) @@ -25988,7 +26455,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(createOfferingOptionsModel.PortalUIURL).To(Equal(core.StringPtr("testString"))) Expect(createOfferingOptionsModel.CatalogID).To(Equal(core.StringPtr("testString"))) Expect(createOfferingOptionsModel.CatalogName).To(Equal(core.StringPtr("testString"))) - Expect(createOfferingOptionsModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(createOfferingOptionsModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(createOfferingOptionsModel.Disclaimer).To(Equal(core.StringPtr("testString"))) Expect(createOfferingOptionsModel.Hidden).To(Equal(core.BoolPtr(true))) Expect(createOfferingOptionsModel.Provider).To(Equal(core.StringPtr("testString"))) @@ -26258,7 +26725,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getConsumptionOfferingsOptionsModel.SetCatalog("testString") getConsumptionOfferingsOptionsModel.SetSelect("all") getConsumptionOfferingsOptionsModel.SetIncludeHidden(true) - getConsumptionOfferingsOptionsModel.SetLimit(int64(1000)) + getConsumptionOfferingsOptionsModel.SetLimit(int64(10)) getConsumptionOfferingsOptionsModel.SetOffset(int64(38)) getConsumptionOfferingsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(getConsumptionOfferingsOptionsModel).ToNot(BeNil()) @@ -26266,7 +26733,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(getConsumptionOfferingsOptionsModel.Catalog).To(Equal(core.StringPtr("testString"))) Expect(getConsumptionOfferingsOptionsModel.Select).To(Equal(core.StringPtr("all"))) Expect(getConsumptionOfferingsOptionsModel.IncludeHidden).To(Equal(core.BoolPtr(true))) - Expect(getConsumptionOfferingsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1000)))) + Expect(getConsumptionOfferingsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(getConsumptionOfferingsOptionsModel.Offset).To(Equal(core.Int64Ptr(int64(38)))) Expect(getConsumptionOfferingsOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) @@ -26294,14 +26761,14 @@ var _ = Describe(`CatalogManagementV1`, func() { getNamespacesOptionsModel.SetClusterID("testString") getNamespacesOptionsModel.SetRegion("testString") getNamespacesOptionsModel.SetXAuthRefreshToken("testString") - getNamespacesOptionsModel.SetLimit(int64(1000)) + getNamespacesOptionsModel.SetLimit(int64(10)) getNamespacesOptionsModel.SetOffset(int64(38)) getNamespacesOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(getNamespacesOptionsModel).ToNot(BeNil()) Expect(getNamespacesOptionsModel.ClusterID).To(Equal(core.StringPtr("testString"))) Expect(getNamespacesOptionsModel.Region).To(Equal(core.StringPtr("testString"))) Expect(getNamespacesOptionsModel.XAuthRefreshToken).To(Equal(core.StringPtr("testString"))) - Expect(getNamespacesOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1000)))) + Expect(getNamespacesOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(getNamespacesOptionsModel.Offset).To(Equal(core.Int64Ptr(int64(38)))) Expect(getNamespacesOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) @@ -26312,13 +26779,13 @@ var _ = Describe(`CatalogManagementV1`, func() { getObjectAccessListDeprecatedOptionsModel := catalogManagementService.NewGetObjectAccessListDeprecatedOptions(catalogIdentifier, objectIdentifier) getObjectAccessListDeprecatedOptionsModel.SetCatalogIdentifier("testString") getObjectAccessListDeprecatedOptionsModel.SetObjectIdentifier("testString") - getObjectAccessListDeprecatedOptionsModel.SetLimit(int64(1000)) + getObjectAccessListDeprecatedOptionsModel.SetLimit(int64(10)) getObjectAccessListDeprecatedOptionsModel.SetOffset(int64(38)) getObjectAccessListDeprecatedOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(getObjectAccessListDeprecatedOptionsModel).ToNot(BeNil()) Expect(getObjectAccessListDeprecatedOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) Expect(getObjectAccessListDeprecatedOptionsModel.ObjectIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(getObjectAccessListDeprecatedOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1000)))) + Expect(getObjectAccessListDeprecatedOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(getObjectAccessListDeprecatedOptionsModel.Offset).To(Equal(core.Int64Ptr(int64(38)))) Expect(getObjectAccessListDeprecatedOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) @@ -26523,6 +26990,7 @@ var _ = Describe(`CatalogManagementV1`, func() { getOfferingSourceOptionsModel.SetID("testString") getOfferingSourceOptionsModel.SetKind("testString") getOfferingSourceOptionsModel.SetChannel("testString") + getOfferingSourceOptionsModel.SetAsIs(true) getOfferingSourceOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(getOfferingSourceOptionsModel).ToNot(BeNil()) Expect(getOfferingSourceOptionsModel.Version).To(Equal(core.StringPtr("testString"))) @@ -26532,6 +27000,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(getOfferingSourceOptionsModel.ID).To(Equal(core.StringPtr("testString"))) Expect(getOfferingSourceOptionsModel.Kind).To(Equal(core.StringPtr("testString"))) Expect(getOfferingSourceOptionsModel.Channel).To(Equal(core.StringPtr("testString"))) + Expect(getOfferingSourceOptionsModel.AsIs).To(Equal(core.BoolPtr(true))) Expect(getOfferingSourceOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewGetOfferingSourceURLOptions successfully`, func() { @@ -26653,29 +27122,6 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(getVersionOptionsModel.VersionLocID).To(Equal(core.StringPtr("testString"))) Expect(getVersionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewIBMPublishObjectOptions successfully`, func() { - // Construct an instance of the IBMPublishObjectOptions model - catalogIdentifier := "testString" - objectIdentifier := "testString" - ibmPublishObjectOptionsModel := catalogManagementService.NewIBMPublishObjectOptions(catalogIdentifier, objectIdentifier) - ibmPublishObjectOptionsModel.SetCatalogIdentifier("testString") - ibmPublishObjectOptionsModel.SetObjectIdentifier("testString") - ibmPublishObjectOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(ibmPublishObjectOptionsModel).ToNot(BeNil()) - Expect(ibmPublishObjectOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(ibmPublishObjectOptionsModel.ObjectIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(ibmPublishObjectOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewIBMPublishVersionOptions successfully`, func() { - // Construct an instance of the IBMPublishVersionOptions model - versionLocID := "testString" - ibmPublishVersionOptionsModel := catalogManagementService.NewIBMPublishVersionOptions(versionLocID) - ibmPublishVersionOptionsModel.SetVersionLocID("testString") - ibmPublishVersionOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(ibmPublishVersionOptionsModel).ToNot(BeNil()) - Expect(ibmPublishVersionOptionsModel.VersionLocID).To(Equal(core.StringPtr("testString"))) - Expect(ibmPublishVersionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) It(`Invoke NewImportOfferingOptions successfully`, func() { // Construct an instance of the Flavor model flavorModel := new(catalogmanagementv1.Flavor) @@ -27079,14 +27525,14 @@ var _ = Describe(`CatalogManagementV1`, func() { catalogIdentifier := "testString" listObjectsOptionsModel := catalogManagementService.NewListObjectsOptions(catalogIdentifier) listObjectsOptionsModel.SetCatalogIdentifier("testString") - listObjectsOptionsModel.SetLimit(int64(1000)) + listObjectsOptionsModel.SetLimit(int64(10)) listObjectsOptionsModel.SetOffset(int64(38)) listObjectsOptionsModel.SetName("testString") listObjectsOptionsModel.SetSort("testString") listObjectsOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(listObjectsOptionsModel).ToNot(BeNil()) Expect(listObjectsOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(listObjectsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1000)))) + Expect(listObjectsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(listObjectsOptionsModel.Offset).To(Equal(core.Int64Ptr(int64(38)))) Expect(listObjectsOptionsModel.Name).To(Equal(core.StringPtr("testString"))) Expect(listObjectsOptionsModel.Sort).To(Equal(core.StringPtr("testString"))) @@ -27133,7 +27579,7 @@ var _ = Describe(`CatalogManagementV1`, func() { listOfferingsOptionsModel := catalogManagementService.NewListOfferingsOptions(catalogIdentifier) listOfferingsOptionsModel.SetCatalogIdentifier("testString") listOfferingsOptionsModel.SetDigest(true) - listOfferingsOptionsModel.SetLimit(int64(1000)) + listOfferingsOptionsModel.SetLimit(int64(10)) listOfferingsOptionsModel.SetOffset(int64(38)) listOfferingsOptionsModel.SetName("testString") listOfferingsOptionsModel.SetSort("testString") @@ -27142,7 +27588,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(listOfferingsOptionsModel).ToNot(BeNil()) Expect(listOfferingsOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) Expect(listOfferingsOptionsModel.Digest).To(Equal(core.BoolPtr(true))) - Expect(listOfferingsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1000)))) + Expect(listOfferingsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(listOfferingsOptionsModel.Offset).To(Equal(core.Int64Ptr(int64(38)))) Expect(listOfferingsOptionsModel.Name).To(Equal(core.StringPtr("testString"))) Expect(listOfferingsOptionsModel.Sort).To(Equal(core.StringPtr("testString"))) @@ -27267,29 +27713,6 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(preinstallVersionOptionsModel.VcenterDatastore).To(Equal(core.StringPtr("testString"))) Expect(preinstallVersionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewPublicPublishObjectOptions successfully`, func() { - // Construct an instance of the PublicPublishObjectOptions model - catalogIdentifier := "testString" - objectIdentifier := "testString" - publicPublishObjectOptionsModel := catalogManagementService.NewPublicPublishObjectOptions(catalogIdentifier, objectIdentifier) - publicPublishObjectOptionsModel.SetCatalogIdentifier("testString") - publicPublishObjectOptionsModel.SetObjectIdentifier("testString") - publicPublishObjectOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(publicPublishObjectOptionsModel).ToNot(BeNil()) - Expect(publicPublishObjectOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(publicPublishObjectOptionsModel.ObjectIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(publicPublishObjectOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) - It(`Invoke NewPublicPublishVersionOptions successfully`, func() { - // Construct an instance of the PublicPublishVersionOptions model - versionLocID := "testString" - publicPublishVersionOptionsModel := catalogManagementService.NewPublicPublishVersionOptions(versionLocID) - publicPublishVersionOptionsModel.SetVersionLocID("testString") - publicPublishVersionOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(publicPublishVersionOptionsModel).ToNot(BeNil()) - Expect(publicPublishVersionOptionsModel.VersionLocID).To(Equal(core.StringPtr("testString"))) - Expect(publicPublishVersionOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) It(`Invoke NewPutOfferingInstanceOptions successfully`, func() { // Construct an instance of the OfferingInstanceLastOperation model offeringInstanceLastOperationModel := new(catalogmanagementv1.OfferingInstanceLastOperation) @@ -27332,7 +27755,7 @@ var _ = Describe(`CatalogManagementV1`, func() { putOfferingInstanceOptionsModel.SetChannel("testString") putOfferingInstanceOptionsModel.SetCreated(CreateMockDateTime("2019-01-01T12:00:00.000Z")) putOfferingInstanceOptionsModel.SetUpdated(CreateMockDateTime("2019-01-01T12:00:00.000Z")) - putOfferingInstanceOptionsModel.SetMetadata(make(map[string]interface{})) + putOfferingInstanceOptionsModel.SetMetadata(map[string]interface{}{"anyKey": "anyValue"}) putOfferingInstanceOptionsModel.SetResourceGroupID("testString") putOfferingInstanceOptionsModel.SetLocation("testString") putOfferingInstanceOptionsModel.SetDisabled(true) @@ -27363,7 +27786,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(putOfferingInstanceOptionsModel.Channel).To(Equal(core.StringPtr("testString"))) Expect(putOfferingInstanceOptionsModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(putOfferingInstanceOptionsModel.Updated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) - Expect(putOfferingInstanceOptionsModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(putOfferingInstanceOptionsModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(putOfferingInstanceOptionsModel.ResourceGroupID).To(Equal(core.StringPtr("testString"))) Expect(putOfferingInstanceOptionsModel.Location).To(Equal(core.StringPtr("testString"))) Expect(putOfferingInstanceOptionsModel.Disabled).To(Equal(core.BoolPtr(true))) @@ -27522,6 +27945,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.SetShortDescription("testString") replaceCatalogOptionsModel.SetShortDescriptionI18n(make(map[string]string)) replaceCatalogOptionsModel.SetCatalogIconURL("testString") + replaceCatalogOptionsModel.SetCatalogBannerURL("testString") replaceCatalogOptionsModel.SetTags([]string{"testString"}) replaceCatalogOptionsModel.SetFeatures([]catalogmanagementv1.Feature{*featureModel}) replaceCatalogOptionsModel.SetDisabled(true) @@ -27530,7 +27954,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceCatalogOptionsModel.SetCatalogFilters(filtersModel) replaceCatalogOptionsModel.SetSyndicationSettings(syndicationResourceModel) replaceCatalogOptionsModel.SetKind("testString") - replaceCatalogOptionsModel.SetMetadata(make(map[string]interface{})) + replaceCatalogOptionsModel.SetMetadata(map[string]interface{}{"anyKey": "anyValue"}) replaceCatalogOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(replaceCatalogOptionsModel).ToNot(BeNil()) Expect(replaceCatalogOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) @@ -27541,6 +27965,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(replaceCatalogOptionsModel.ShortDescription).To(Equal(core.StringPtr("testString"))) Expect(replaceCatalogOptionsModel.ShortDescriptionI18n).To(Equal(make(map[string]string))) Expect(replaceCatalogOptionsModel.CatalogIconURL).To(Equal(core.StringPtr("testString"))) + Expect(replaceCatalogOptionsModel.CatalogBannerURL).To(Equal(core.StringPtr("testString"))) Expect(replaceCatalogOptionsModel.Tags).To(Equal([]string{"testString"})) Expect(replaceCatalogOptionsModel.Features).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(replaceCatalogOptionsModel.Disabled).To(Equal(core.BoolPtr(true))) @@ -27549,7 +27974,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(replaceCatalogOptionsModel.CatalogFilters).To(Equal(filtersModel)) Expect(replaceCatalogOptionsModel.SyndicationSettings).To(Equal(syndicationResourceModel)) Expect(replaceCatalogOptionsModel.Kind).To(Equal(core.StringPtr("testString"))) - Expect(replaceCatalogOptionsModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(replaceCatalogOptionsModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(replaceCatalogOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewReplaceObjectOptions successfully`, func() { @@ -27588,8 +28013,8 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.SetCatalogIdentifier("testString") replaceObjectOptionsModel.SetObjectIdentifier("testString") replaceObjectOptionsModel.SetID("testString") - replaceObjectOptionsModel.SetName("testString") replaceObjectOptionsModel.SetRev("testString") + replaceObjectOptionsModel.SetName("testString") replaceObjectOptionsModel.SetCRN("testString") replaceObjectOptionsModel.SetURL("testString") replaceObjectOptionsModel.SetParentID("testString") @@ -27605,14 +28030,14 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceObjectOptionsModel.SetState(stateModel) replaceObjectOptionsModel.SetCatalogID("testString") replaceObjectOptionsModel.SetCatalogName("testString") - replaceObjectOptionsModel.SetData(make(map[string]interface{})) + replaceObjectOptionsModel.SetData(map[string]interface{}{"anyKey": "anyValue"}) replaceObjectOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(replaceObjectOptionsModel).ToNot(BeNil()) Expect(replaceObjectOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) Expect(replaceObjectOptionsModel.ObjectIdentifier).To(Equal(core.StringPtr("testString"))) Expect(replaceObjectOptionsModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(replaceObjectOptionsModel.Name).To(Equal(core.StringPtr("testString"))) Expect(replaceObjectOptionsModel.Rev).To(Equal(core.StringPtr("testString"))) + Expect(replaceObjectOptionsModel.Name).To(Equal(core.StringPtr("testString"))) Expect(replaceObjectOptionsModel.CRN).To(Equal(core.StringPtr("testString"))) Expect(replaceObjectOptionsModel.URL).To(Equal(core.StringPtr("testString"))) Expect(replaceObjectOptionsModel.ParentID).To(Equal(core.StringPtr("testString"))) @@ -27628,7 +28053,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(replaceObjectOptionsModel.State).To(Equal(stateModel)) Expect(replaceObjectOptionsModel.CatalogID).To(Equal(core.StringPtr("testString"))) Expect(replaceObjectOptionsModel.CatalogName).To(Equal(core.StringPtr("testString"))) - Expect(replaceObjectOptionsModel.Data).To(Equal(make(map[string]interface{}))) + Expect(replaceObjectOptionsModel.Data).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(replaceObjectOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) It(`Invoke NewReplaceOfferingOptions successfully`, func() { @@ -27759,13 +28184,13 @@ var _ = Describe(`CatalogManagementV1`, func() { validationModel.Requested = CreateMockDateTime("2019-01-01T12:00:00.000Z") validationModel.State = core.StringPtr("testString") validationModel.LastOperation = core.StringPtr("testString") - validationModel.Target = make(map[string]interface{}) + validationModel.Target = map[string]interface{}{"anyKey": "anyValue"} validationModel.Message = core.StringPtr("testString") Expect(validationModel.Validated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(validationModel.Requested).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(validationModel.State).To(Equal(core.StringPtr("testString"))) Expect(validationModel.LastOperation).To(Equal(core.StringPtr("testString"))) - Expect(validationModel.Target).To(Equal(make(map[string]interface{}))) + Expect(validationModel.Target).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(validationModel.Message).To(Equal(core.StringPtr("testString"))) // Construct an instance of the Resource model @@ -27902,12 +28327,12 @@ var _ = Describe(`CatalogManagementV1`, func() { costResourceModel := new(catalogmanagementv1.CostResource) Expect(costResourceModel).ToNot(BeNil()) costResourceModel.Name = core.StringPtr("testString") - costResourceModel.Metadata = make(map[string]interface{}) + costResourceModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} costResourceModel.HourlyCost = core.StringPtr("testString") costResourceModel.MonthlyCost = core.StringPtr("testString") costResourceModel.CostComponents = []catalogmanagementv1.CostComponent{*costComponentModel} Expect(costResourceModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(costResourceModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(costResourceModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(costResourceModel.HourlyCost).To(Equal(core.StringPtr("testString"))) Expect(costResourceModel.MonthlyCost).To(Equal(core.StringPtr("testString"))) Expect(costResourceModel.CostComponents).To(Equal([]catalogmanagementv1.CostComponent{*costComponentModel})) @@ -27916,10 +28341,10 @@ var _ = Describe(`CatalogManagementV1`, func() { costBreakdownModel := new(catalogmanagementv1.CostBreakdown) Expect(costBreakdownModel).ToNot(BeNil()) costBreakdownModel.TotalHourlyCost = core.StringPtr("testString") - costBreakdownModel.TotalMonthlyCOst = core.StringPtr("testString") + costBreakdownModel.TotalMonthlyCost = core.StringPtr("testString") costBreakdownModel.Resources = []catalogmanagementv1.CostResource{*costResourceModel} Expect(costBreakdownModel.TotalHourlyCost).To(Equal(core.StringPtr("testString"))) - Expect(costBreakdownModel.TotalMonthlyCOst).To(Equal(core.StringPtr("testString"))) + Expect(costBreakdownModel.TotalMonthlyCost).To(Equal(core.StringPtr("testString"))) Expect(costBreakdownModel.Resources).To(Equal([]catalogmanagementv1.CostResource{*costResourceModel})) // Construct an instance of the CostSummary model @@ -27944,13 +28369,13 @@ var _ = Describe(`CatalogManagementV1`, func() { projectModel := new(catalogmanagementv1.Project) Expect(projectModel).ToNot(BeNil()) projectModel.Name = core.StringPtr("testString") - projectModel.Metadata = make(map[string]interface{}) + projectModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} projectModel.PastBreakdown = costBreakdownModel projectModel.Breakdown = costBreakdownModel projectModel.Diff = costBreakdownModel projectModel.Summary = costSummaryModel Expect(projectModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(projectModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(projectModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(projectModel.PastBreakdown).To(Equal(costBreakdownModel)) Expect(projectModel.Breakdown).To(Equal(costBreakdownModel)) Expect(projectModel.Diff).To(Equal(costBreakdownModel)) @@ -27982,19 +28407,21 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(costEstimateModel.DiffTotalMonthlyCost).To(Equal(core.StringPtr("testString"))) Expect(costEstimateModel.TimeGenerated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) - // Construct an instance of the Dependency model - dependencyModel := new(catalogmanagementv1.Dependency) - Expect(dependencyModel).ToNot(BeNil()) - dependencyModel.CatalogID = core.StringPtr("testString") - dependencyModel.ID = core.StringPtr("testString") - dependencyModel.Name = core.StringPtr("testString") - dependencyModel.Version = core.StringPtr("testString") - dependencyModel.Flavors = []string{"testString"} - Expect(dependencyModel.CatalogID).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.Name).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.Version).To(Equal(core.StringPtr("testString"))) - Expect(dependencyModel.Flavors).To(Equal([]string{"testString"})) + // Construct an instance of the OfferingReference model + offeringReferenceModel := new(catalogmanagementv1.OfferingReference) + Expect(offeringReferenceModel).ToNot(BeNil()) + offeringReferenceModel.CatalogID = core.StringPtr("testString") + offeringReferenceModel.ID = core.StringPtr("testString") + offeringReferenceModel.Name = core.StringPtr("testString") + offeringReferenceModel.Kind = core.StringPtr("testString") + offeringReferenceModel.Version = core.StringPtr("testString") + offeringReferenceModel.Flavors = []string{"testString"} + Expect(offeringReferenceModel.CatalogID).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Name).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Kind).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Version).To(Equal(core.StringPtr("testString"))) + Expect(offeringReferenceModel.Flavors).To(Equal([]string{"testString"})) // Construct an instance of the SolutionInfo model solutionInfoModel := new(catalogmanagementv1.SolutionInfo) @@ -28002,17 +28429,63 @@ var _ = Describe(`CatalogManagementV1`, func() { solutionInfoModel.ArchitectureDiagrams = []catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel} solutionInfoModel.Features = []catalogmanagementv1.Feature{*featureModel} solutionInfoModel.CostEstimate = costEstimateModel - solutionInfoModel.Dependencies = []catalogmanagementv1.Dependency{*dependencyModel} + solutionInfoModel.Dependencies = []catalogmanagementv1.OfferingReference{*offeringReferenceModel} Expect(solutionInfoModel.ArchitectureDiagrams).To(Equal([]catalogmanagementv1.ArchitectureDiagram{*architectureDiagramModel})) Expect(solutionInfoModel.Features).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(solutionInfoModel.CostEstimate).To(Equal(costEstimateModel)) - Expect(solutionInfoModel.Dependencies).To(Equal([]catalogmanagementv1.Dependency{*dependencyModel})) + Expect(solutionInfoModel.Dependencies).To(Equal([]catalogmanagementv1.OfferingReference{*offeringReferenceModel})) + + // Construct an instance of the ComplianceControlSccProfile model + complianceControlSccProfileModel := new(catalogmanagementv1.ComplianceControlSccProfile) + Expect(complianceControlSccProfileModel).ToNot(BeNil()) + complianceControlSccProfileModel.Type = core.StringPtr("testString") + Expect(complianceControlSccProfileModel.Type).To(Equal(core.StringPtr("testString"))) + + // Construct an instance of the ComplianceControlFamily model + complianceControlFamilyModel := new(catalogmanagementv1.ComplianceControlFamily) + Expect(complianceControlFamilyModel).ToNot(BeNil()) + complianceControlFamilyModel.ID = core.StringPtr("testString") + complianceControlFamilyModel.ExternalID = core.StringPtr("testString") + complianceControlFamilyModel.Description = core.StringPtr("testString") + complianceControlFamilyModel.UIHref = core.StringPtr("testString") + Expect(complianceControlFamilyModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(complianceControlFamilyModel.ExternalID).To(Equal(core.StringPtr("testString"))) + Expect(complianceControlFamilyModel.Description).To(Equal(core.StringPtr("testString"))) + Expect(complianceControlFamilyModel.UIHref).To(Equal(core.StringPtr("testString"))) + + // Construct an instance of the Goal model + goalModel := new(catalogmanagementv1.Goal) + Expect(goalModel).ToNot(BeNil()) + goalModel.ID = core.StringPtr("testString") + goalModel.Description = core.StringPtr("testString") + goalModel.UIHref = core.StringPtr("testString") + Expect(goalModel.ID).To(Equal(core.StringPtr("testString"))) + Expect(goalModel.Description).To(Equal(core.StringPtr("testString"))) + Expect(goalModel.UIHref).To(Equal(core.StringPtr("testString"))) + + // Construct an instance of the ComplianceControlValidation model + complianceControlValidationModel := new(catalogmanagementv1.ComplianceControlValidation) + Expect(complianceControlValidationModel).ToNot(BeNil()) + complianceControlValidationModel.Certified = core.BoolPtr(true) + complianceControlValidationModel.Results = map[string]interface{}{"anyKey": "anyValue"} + Expect(complianceControlValidationModel.Certified).To(Equal(core.BoolPtr(true))) + Expect(complianceControlValidationModel.Results).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) + + // Construct an instance of the ComplianceControl model + complianceControlModel := new(catalogmanagementv1.ComplianceControl) + Expect(complianceControlModel).ToNot(BeNil()) + complianceControlModel.SccProfile = complianceControlSccProfileModel + complianceControlModel.Family = complianceControlFamilyModel + complianceControlModel.Goals = []catalogmanagementv1.Goal{*goalModel} + complianceControlModel.Validation = complianceControlValidationModel + Expect(complianceControlModel.SccProfile).To(Equal(complianceControlSccProfileModel)) + Expect(complianceControlModel.Family).To(Equal(complianceControlFamilyModel)) + Expect(complianceControlModel.Goals).To(Equal([]catalogmanagementv1.Goal{*goalModel})) + Expect(complianceControlModel.Validation).To(Equal(complianceControlValidationModel)) // Construct an instance of the Version model versionModel := new(catalogmanagementv1.Version) Expect(versionModel).ToNot(BeNil()) - versionModel.ID = core.StringPtr("testString") - versionModel.Rev = core.StringPtr("testString") versionModel.CRN = core.StringPtr("testString") versionModel.Version = core.StringPtr("testString") versionModel.Flavor = flavorModel @@ -28029,7 +28502,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.Configuration = []catalogmanagementv1.Configuration{*configurationModel} versionModel.Outputs = []catalogmanagementv1.Output{*outputModel} versionModel.IamPermissions = []catalogmanagementv1.IamPermission{*iamPermissionModel} - versionModel.Metadata = make(map[string]interface{}) + versionModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} versionModel.Validation = validationModel versionModel.RequiredResources = []catalogmanagementv1.Resource{*resourceModel} versionModel.SingleInstance = core.BoolPtr(true) @@ -28049,8 +28522,7 @@ var _ = Describe(`CatalogManagementV1`, func() { versionModel.DeprecatePending = deprecatePendingModel versionModel.SolutionInfo = solutionInfoModel versionModel.IsConsumable = core.BoolPtr(true) - Expect(versionModel.ID).To(Equal(core.StringPtr("testString"))) - Expect(versionModel.Rev).To(Equal(core.StringPtr("testString"))) + versionModel.Compliance = []catalogmanagementv1.ComplianceControl{*complianceControlModel} Expect(versionModel.CRN).To(Equal(core.StringPtr("testString"))) Expect(versionModel.Version).To(Equal(core.StringPtr("testString"))) Expect(versionModel.Flavor).To(Equal(flavorModel)) @@ -28067,7 +28539,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(versionModel.Configuration).To(Equal([]catalogmanagementv1.Configuration{*configurationModel})) Expect(versionModel.Outputs).To(Equal([]catalogmanagementv1.Output{*outputModel})) Expect(versionModel.IamPermissions).To(Equal([]catalogmanagementv1.IamPermission{*iamPermissionModel})) - Expect(versionModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(versionModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(versionModel.Validation).To(Equal(validationModel)) Expect(versionModel.RequiredResources).To(Equal([]catalogmanagementv1.Resource{*resourceModel})) Expect(versionModel.SingleInstance).To(Equal(core.BoolPtr(true))) @@ -28087,6 +28559,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(versionModel.DeprecatePending).To(Equal(deprecatePendingModel)) Expect(versionModel.SolutionInfo).To(Equal(solutionInfoModel)) Expect(versionModel.IsConsumable).To(Equal(core.BoolPtr(true))) + Expect(versionModel.Compliance).To(Equal([]catalogmanagementv1.ComplianceControl{*complianceControlModel})) // Construct an instance of the Deployment model deploymentModel := new(catalogmanagementv1.Deployment) @@ -28096,7 +28569,7 @@ var _ = Describe(`CatalogManagementV1`, func() { deploymentModel.Name = core.StringPtr("testString") deploymentModel.ShortDescription = core.StringPtr("testString") deploymentModel.LongDescription = core.StringPtr("testString") - deploymentModel.Metadata = make(map[string]interface{}) + deploymentModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} deploymentModel.Tags = []string{"testString"} deploymentModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") deploymentModel.Updated = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -28105,7 +28578,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(deploymentModel.Name).To(Equal(core.StringPtr("testString"))) Expect(deploymentModel.ShortDescription).To(Equal(core.StringPtr("testString"))) Expect(deploymentModel.LongDescription).To(Equal(core.StringPtr("testString"))) - Expect(deploymentModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(deploymentModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(deploymentModel.Tags).To(Equal([]string{"testString"})) Expect(deploymentModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) Expect(deploymentModel.Updated).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) @@ -28118,7 +28591,7 @@ var _ = Describe(`CatalogManagementV1`, func() { planModel.Name = core.StringPtr("testString") planModel.ShortDescription = core.StringPtr("testString") planModel.LongDescription = core.StringPtr("testString") - planModel.Metadata = make(map[string]interface{}) + planModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} planModel.Tags = []string{"testString"} planModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} planModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -28129,7 +28602,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(planModel.Name).To(Equal(core.StringPtr("testString"))) Expect(planModel.ShortDescription).To(Equal(core.StringPtr("testString"))) Expect(planModel.LongDescription).To(Equal(core.StringPtr("testString"))) - Expect(planModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(planModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(planModel.Tags).To(Equal([]string{"testString"})) Expect(planModel.AdditionalFeatures).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(planModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) @@ -28143,7 +28616,7 @@ var _ = Describe(`CatalogManagementV1`, func() { kindModel.FormatKind = core.StringPtr("testString") kindModel.InstallKind = core.StringPtr("testString") kindModel.TargetKind = core.StringPtr("testString") - kindModel.Metadata = make(map[string]interface{}) + kindModel.Metadata = map[string]interface{}{"anyKey": "anyValue"} kindModel.Tags = []string{"testString"} kindModel.AdditionalFeatures = []catalogmanagementv1.Feature{*featureModel} kindModel.Created = CreateMockDateTime("2019-01-01T12:00:00.000Z") @@ -28154,7 +28627,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(kindModel.FormatKind).To(Equal(core.StringPtr("testString"))) Expect(kindModel.InstallKind).To(Equal(core.StringPtr("testString"))) Expect(kindModel.TargetKind).To(Equal(core.StringPtr("testString"))) - Expect(kindModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(kindModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(kindModel.Tags).To(Equal([]string{"testString"})) Expect(kindModel.AdditionalFeatures).To(Equal([]catalogmanagementv1.Feature{*featureModel})) Expect(kindModel.Created).To(Equal(CreateMockDateTime("2019-01-01T12:00:00.000Z"))) @@ -28337,7 +28810,7 @@ var _ = Describe(`CatalogManagementV1`, func() { replaceOfferingOptionsModel.SetPortalUIURL("testString") replaceOfferingOptionsModel.SetCatalogID("testString") replaceOfferingOptionsModel.SetCatalogName("testString") - replaceOfferingOptionsModel.SetMetadata(make(map[string]interface{})) + replaceOfferingOptionsModel.SetMetadata(map[string]interface{}{"anyKey": "anyValue"}) replaceOfferingOptionsModel.SetDisclaimer("testString") replaceOfferingOptionsModel.SetHidden(true) replaceOfferingOptionsModel.SetProvider("testString") @@ -28388,7 +28861,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(replaceOfferingOptionsModel.PortalUIURL).To(Equal(core.StringPtr("testString"))) Expect(replaceOfferingOptionsModel.CatalogID).To(Equal(core.StringPtr("testString"))) Expect(replaceOfferingOptionsModel.CatalogName).To(Equal(core.StringPtr("testString"))) - Expect(replaceOfferingOptionsModel.Metadata).To(Equal(make(map[string]interface{}))) + Expect(replaceOfferingOptionsModel.Metadata).To(Equal(map[string]interface{}{"anyKey": "anyValue"})) Expect(replaceOfferingOptionsModel.Disclaimer).To(Equal(core.StringPtr("testString"))) Expect(replaceOfferingOptionsModel.Hidden).To(Equal(core.BoolPtr(true))) Expect(replaceOfferingOptionsModel.Provider).To(Equal(core.StringPtr("testString"))) @@ -28432,7 +28905,7 @@ var _ = Describe(`CatalogManagementV1`, func() { searchObjectsOptionsModel := catalogManagementService.NewSearchObjectsOptions(query) searchObjectsOptionsModel.SetQuery("testString") searchObjectsOptionsModel.SetKind("vpe") - searchObjectsOptionsModel.SetLimit(int64(1000)) + searchObjectsOptionsModel.SetLimit(int64(10)) searchObjectsOptionsModel.SetOffset(int64(38)) searchObjectsOptionsModel.SetCollapse(true) searchObjectsOptionsModel.SetDigest(true) @@ -28440,7 +28913,7 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(searchObjectsOptionsModel).ToNot(BeNil()) Expect(searchObjectsOptionsModel.Query).To(Equal(core.StringPtr("testString"))) Expect(searchObjectsOptionsModel.Kind).To(Equal(core.StringPtr("vpe"))) - Expect(searchObjectsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(1000)))) + Expect(searchObjectsOptionsModel.Limit).To(Equal(core.Int64Ptr(int64(10)))) Expect(searchObjectsOptionsModel.Offset).To(Equal(core.Int64Ptr(int64(38)))) Expect(searchObjectsOptionsModel.Collapse).To(Equal(core.BoolPtr(true))) Expect(searchObjectsOptionsModel.Digest).To(Equal(core.BoolPtr(true))) @@ -28526,19 +28999,6 @@ var _ = Describe(`CatalogManagementV1`, func() { Expect(shareOfferingOptionsModel.Enabled).To(Equal(core.BoolPtr(true))) Expect(shareOfferingOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) }) - It(`Invoke NewSharedPublishObjectOptions successfully`, func() { - // Construct an instance of the SharedPublishObjectOptions model - catalogIdentifier := "testString" - objectIdentifier := "testString" - sharedPublishObjectOptionsModel := catalogManagementService.NewSharedPublishObjectOptions(catalogIdentifier, objectIdentifier) - sharedPublishObjectOptionsModel.SetCatalogIdentifier("testString") - sharedPublishObjectOptionsModel.SetObjectIdentifier("testString") - sharedPublishObjectOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) - Expect(sharedPublishObjectOptionsModel).ToNot(BeNil()) - Expect(sharedPublishObjectOptionsModel.CatalogIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(sharedPublishObjectOptionsModel.ObjectIdentifier).To(Equal(core.StringPtr("testString"))) - Expect(sharedPublishObjectOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) - }) It(`Invoke NewSuspendVersionOptions successfully`, func() { // Construct an instance of the SuspendVersionOptions model versionLocID := "testString"