Skip to content

Commit f0cbf75

Browse files
feat(partner center sell): make tags on deployment creation optional (#377)
* feat(partner center sell): make tags on deployment creation not required Signed-off-by: Peter Harasztia <[email protected]> * feat(partner center sell): fix deafault url Signed-off-by: Peter Harasztia <[email protected]> * feat(partner center sell): make tags not required on plans as well Signed-off-by: Peter Harasztia <[email protected]> * feat(partner center sell): example test fix Signed-off-by: Peter Harasztia <[email protected]> --------- Signed-off-by: Peter Harasztia <[email protected]>
1 parent 3f6af75 commit f0cbf75

File tree

3 files changed

+45
-51
lines changed

3 files changed

+45
-51
lines changed

partnercentersellv1/partner_center_sell_v1.go

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/*
18-
* IBM OpenAPI SDK Code Generator Version: 3.99.1-daeb6e46-20250131-173156
18+
* IBM OpenAPI SDK Code Generator Version: 3.101.0-62624c1e-20250225-192301
1919
*/
2020

2121
// Package partnercentersellv1 : Operations and models for the PartnerCenterSellV1 service
@@ -1158,9 +1158,6 @@ func (partnerCenterSell *PartnerCenterSellV1) CreateCatalogPlanWithContext(ctx c
11581158
if createCatalogPlanOptions.Kind != nil {
11591159
body["kind"] = createCatalogPlanOptions.Kind
11601160
}
1161-
if createCatalogPlanOptions.Tags != nil {
1162-
body["tags"] = createCatalogPlanOptions.Tags
1163-
}
11641161
if createCatalogPlanOptions.ObjectProvider != nil {
11651162
body["object_provider"] = createCatalogPlanOptions.ObjectProvider
11661163
}
@@ -1173,6 +1170,9 @@ func (partnerCenterSell *PartnerCenterSellV1) CreateCatalogPlanWithContext(ctx c
11731170
if createCatalogPlanOptions.OverviewUi != nil {
11741171
body["overview_ui"] = createCatalogPlanOptions.OverviewUi
11751172
}
1173+
if createCatalogPlanOptions.Tags != nil {
1174+
body["tags"] = createCatalogPlanOptions.Tags
1175+
}
11761176
if createCatalogPlanOptions.PricingTags != nil {
11771177
body["pricing_tags"] = createCatalogPlanOptions.PricingTags
11781178
}
@@ -1497,9 +1497,6 @@ func (partnerCenterSell *PartnerCenterSellV1) CreateCatalogDeploymentWithContext
14971497
if createCatalogDeploymentOptions.Kind != nil {
14981498
body["kind"] = createCatalogDeploymentOptions.Kind
14991499
}
1500-
if createCatalogDeploymentOptions.Tags != nil {
1501-
body["tags"] = createCatalogDeploymentOptions.Tags
1502-
}
15031500
if createCatalogDeploymentOptions.ObjectProvider != nil {
15041501
body["object_provider"] = createCatalogDeploymentOptions.ObjectProvider
15051502
}
@@ -1512,6 +1509,9 @@ func (partnerCenterSell *PartnerCenterSellV1) CreateCatalogDeploymentWithContext
15121509
if createCatalogDeploymentOptions.OverviewUi != nil {
15131510
body["overview_ui"] = createCatalogDeploymentOptions.OverviewUi
15141511
}
1512+
if createCatalogDeploymentOptions.Tags != nil {
1513+
body["tags"] = createCatalogDeploymentOptions.Tags
1514+
}
15151515
if createCatalogDeploymentOptions.Metadata != nil {
15161516
body["metadata"] = createCatalogDeploymentOptions.Metadata
15171517
}
@@ -3237,10 +3237,6 @@ type CreateCatalogDeploymentOptions struct {
32373237
// The kind of the global catalog object.
32383238
Kind *string `json:"kind" validate:"required"`
32393239

3240-
// A list of tags that carry information about your product. These tags can be used to find your product in the IBM
3241-
// Cloud catalog.
3242-
Tags []string `json:"tags" validate:"required"`
3243-
32443240
// The provider or owner of the product.
32453241
ObjectProvider *CatalogProductProvider `json:"object_provider" validate:"required"`
32463242

@@ -3253,6 +3249,10 @@ type CreateCatalogDeploymentOptions struct {
32533249
// The object that contains the service details from the Overview page in global catalog.
32543250
OverviewUi *GlobalCatalogOverviewUI `json:"overview_ui,omitempty"`
32553251

3252+
// A list of tags that carry information about your product. These tags can be used to find your product in the IBM
3253+
// Cloud catalog.
3254+
Tags []string `json:"tags,omitempty"`
3255+
32563256
// Global catalog deployment metadata.
32573257
Metadata *GlobalCatalogDeploymentMetadataPrototypePatch `json:"metadata,omitempty"`
32583258

@@ -3270,7 +3270,7 @@ const (
32703270
)
32713271

32723272
// NewCreateCatalogDeploymentOptions : Instantiate CreateCatalogDeploymentOptions
3273-
func (*PartnerCenterSellV1) NewCreateCatalogDeploymentOptions(productID string, catalogProductID string, catalogPlanID string, name string, active bool, disabled bool, kind string, tags []string, objectProvider *CatalogProductProvider) *CreateCatalogDeploymentOptions {
3273+
func (*PartnerCenterSellV1) NewCreateCatalogDeploymentOptions(productID string, catalogProductID string, catalogPlanID string, name string, active bool, disabled bool, kind string, objectProvider *CatalogProductProvider) *CreateCatalogDeploymentOptions {
32743274
return &CreateCatalogDeploymentOptions{
32753275
ProductID: core.StringPtr(productID),
32763276
CatalogProductID: core.StringPtr(catalogProductID),
@@ -3279,7 +3279,6 @@ func (*PartnerCenterSellV1) NewCreateCatalogDeploymentOptions(productID string,
32793279
Active: core.BoolPtr(active),
32803280
Disabled: core.BoolPtr(disabled),
32813281
Kind: core.StringPtr(kind),
3282-
Tags: tags,
32833282
ObjectProvider: objectProvider,
32843283
}
32853284
}
@@ -3326,12 +3325,6 @@ func (_options *CreateCatalogDeploymentOptions) SetKind(kind string) *CreateCata
33263325
return _options
33273326
}
33283327

3329-
// SetTags : Allow user to set Tags
3330-
func (_options *CreateCatalogDeploymentOptions) SetTags(tags []string) *CreateCatalogDeploymentOptions {
3331-
_options.Tags = tags
3332-
return _options
3333-
}
3334-
33353328
// SetObjectProvider : Allow user to set ObjectProvider
33363329
func (_options *CreateCatalogDeploymentOptions) SetObjectProvider(objectProvider *CatalogProductProvider) *CreateCatalogDeploymentOptions {
33373330
_options.ObjectProvider = objectProvider
@@ -3356,6 +3349,12 @@ func (_options *CreateCatalogDeploymentOptions) SetOverviewUi(overviewUi *Global
33563349
return _options
33573350
}
33583351

3352+
// SetTags : Allow user to set Tags
3353+
func (_options *CreateCatalogDeploymentOptions) SetTags(tags []string) *CreateCatalogDeploymentOptions {
3354+
_options.Tags = tags
3355+
return _options
3356+
}
3357+
33593358
// SetMetadata : Allow user to set Metadata
33603359
func (_options *CreateCatalogDeploymentOptions) SetMetadata(metadata *GlobalCatalogDeploymentMetadataPrototypePatch) *CreateCatalogDeploymentOptions {
33613360
_options.Metadata = metadata
@@ -3395,10 +3394,6 @@ type CreateCatalogPlanOptions struct {
33953394
// The kind of the global catalog object.
33963395
Kind *string `json:"kind" validate:"required"`
33973396

3398-
// A list of tags that carry information about your product. These tags can be used to find your product in the IBM
3399-
// Cloud catalog.
3400-
Tags []string `json:"tags" validate:"required"`
3401-
34023397
// The provider or owner of the product.
34033398
ObjectProvider *CatalogProductProvider `json:"object_provider" validate:"required"`
34043399

@@ -3411,6 +3406,10 @@ type CreateCatalogPlanOptions struct {
34113406
// The object that contains the service details from the Overview page in global catalog.
34123407
OverviewUi *GlobalCatalogOverviewUI `json:"overview_ui,omitempty"`
34133408

3409+
// A list of tags that carry information about your product. These tags can be used to find your product in the IBM
3410+
// Cloud catalog.
3411+
Tags []string `json:"tags,omitempty"`
3412+
34143413
// A list of tags that carry information about the pricing information of your product.
34153414
PricingTags []string `json:"pricing_tags,omitempty"`
34163415

@@ -3431,15 +3430,14 @@ const (
34313430
)
34323431

34333432
// NewCreateCatalogPlanOptions : Instantiate CreateCatalogPlanOptions
3434-
func (*PartnerCenterSellV1) NewCreateCatalogPlanOptions(productID string, catalogProductID string, name string, active bool, disabled bool, kind string, tags []string, objectProvider *CatalogProductProvider) *CreateCatalogPlanOptions {
3433+
func (*PartnerCenterSellV1) NewCreateCatalogPlanOptions(productID string, catalogProductID string, name string, active bool, disabled bool, kind string, objectProvider *CatalogProductProvider) *CreateCatalogPlanOptions {
34353434
return &CreateCatalogPlanOptions{
34363435
ProductID: core.StringPtr(productID),
34373436
CatalogProductID: core.StringPtr(catalogProductID),
34383437
Name: core.StringPtr(name),
34393438
Active: core.BoolPtr(active),
34403439
Disabled: core.BoolPtr(disabled),
34413440
Kind: core.StringPtr(kind),
3442-
Tags: tags,
34433441
ObjectProvider: objectProvider,
34443442
}
34453443
}
@@ -3480,12 +3478,6 @@ func (_options *CreateCatalogPlanOptions) SetKind(kind string) *CreateCatalogPla
34803478
return _options
34813479
}
34823480

3483-
// SetTags : Allow user to set Tags
3484-
func (_options *CreateCatalogPlanOptions) SetTags(tags []string) *CreateCatalogPlanOptions {
3485-
_options.Tags = tags
3486-
return _options
3487-
}
3488-
34893481
// SetObjectProvider : Allow user to set ObjectProvider
34903482
func (_options *CreateCatalogPlanOptions) SetObjectProvider(objectProvider *CatalogProductProvider) *CreateCatalogPlanOptions {
34913483
_options.ObjectProvider = objectProvider
@@ -3510,6 +3502,12 @@ func (_options *CreateCatalogPlanOptions) SetOverviewUi(overviewUi *GlobalCatalo
35103502
return _options
35113503
}
35123504

3505+
// SetTags : Allow user to set Tags
3506+
func (_options *CreateCatalogPlanOptions) SetTags(tags []string) *CreateCatalogPlanOptions {
3507+
_options.Tags = tags
3508+
return _options
3509+
}
3510+
35133511
// SetPricingTags : Allow user to set PricingTags
35143512
func (_options *CreateCatalogPlanOptions) SetPricingTags(pricingTags []string) *CreateCatalogPlanOptions {
35153513
_options.PricingTags = pricingTags

partnercentersellv1/partner_center_sell_v1_examples_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ var _ = Describe(`PartnerCenterSellV1 Examples Tests`, func() {
382382
true,
383383
false,
384384
"plan",
385-
[]string{"ibm_created"},
386385
catalogProductProviderModel,
387386
)
388387
createCatalogPlanOptions.SetOverviewUi(globalCatalogOverviewUiModel)
@@ -487,7 +486,6 @@ var _ = Describe(`PartnerCenterSellV1 Examples Tests`, func() {
487486
true,
488487
false,
489488
"deployment",
490-
[]string{"eu-gb"},
491489
catalogProductProviderModel,
492490
)
493491
createCatalogDeploymentOptions.SetMetadata(globalCatalogDeploymentMetadataPrototypePatchModel)

0 commit comments

Comments
 (0)