Skip to content

Commit

Permalink
fixed wrong sdk generated previoulsy
Browse files Browse the repository at this point in the history
Signed-off-by: namratabhadauriya <[email protected]>
  • Loading branch information
namratabhadauriya committed Apr 24, 2024
1 parent b5b838b commit a7070ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
19 changes: 17 additions & 2 deletions enterprisemanagementv1/enterprise_management_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

/*
* IBM OpenAPI SDK Code Generator Version: 3.87.0-91c7c775-20240320-213027
* IBM OpenAPI SDK Code Generator Version: 3.89.1-ed9d96f4-20240417-193115
*/

// Package enterprisemanagementv1 : Operations and models for the EnterpriseManagementV1 service
Expand Down Expand Up @@ -1743,7 +1743,7 @@ func (options *CreateAccountOptions) SetHeaders(param map[string]string) *Create
}

// CreateAccountRequestOptions : The options object can be used to set properties on child accounts of an enterprise. You can pass a field to to
// create IAM service id with IAM api key when creating a child account in the enterprise. This is an optional field.
// create IAM service id with IAM api keyg when creating a child account in the enterprise. This is an optional field.
type CreateAccountRequestOptions struct {
// By default create_iam_service_id_with_apikey_and_owner_policies is turned off for a newly created child account. You
// can enable this property by passing 'true' in this boolean field. IAM service id has account owner IAM policies and
Expand Down Expand Up @@ -1818,6 +1818,21 @@ func UnmarshalCreateAccountResponse(m map[string]json.RawMessage, result interfa
err = core.SDKErrorf(err, "", "account_id-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "iam_service_id", &obj.IamServiceID)
if err != nil {
err = core.SDKErrorf(err, "", "iam_service_id-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "iam_apikey_id", &obj.IamApikeyID)
if err != nil {
err = core.SDKErrorf(err, "", "iam_apikey_id-error", common.GetComponentInfo())
return
}
err = core.UnmarshalPrimitive(m, "iam_apikey", &obj.IamApikey)
if err != nil {
err = core.SDKErrorf(err, "", "iam_apikey-error", common.GetComponentInfo())
return
}
reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj))
return
}
Expand Down
5 changes: 2 additions & 3 deletions enterprisemanagementv1/enterprise_management_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ var _ = Describe(`EnterpriseManagementV1`, func() {
// Set mock response
res.Header().Set("Content-type", "application/json")
res.WriteHeader(202)
fmt.Fprintf(res, "%s", `{"account_id": "AccountID"}`)
fmt.Fprintf(res, "%s", `{"account_id": "AccountID", "iam_service_id": "IamServiceID", "iam_apikey_id": "IamApikeyID", "iam_apikey": "IamApikey"}`)
}))
})
It(`Invoke CreateAccount successfully with retries`, func() {
Expand Down Expand Up @@ -1330,7 +1330,7 @@ var _ = Describe(`EnterpriseManagementV1`, func() {
// Set mock response
res.Header().Set("Content-type", "application/json")
res.WriteHeader(202)
fmt.Fprintf(res, "%s", `{"account_id": "AccountID"}`)
fmt.Fprintf(res, "%s", `{"account_id": "AccountID", "iam_service_id": "IamServiceID", "iam_apikey_id": "IamApikeyID", "iam_apikey": "IamApikey"}`)
}))
})
It(`Invoke CreateAccount successfully`, func() {
Expand Down Expand Up @@ -3435,7 +3435,6 @@ var _ = Describe(`EnterpriseManagementV1`, func() {
Expect(result).To(Equal(model))
})
})

Describe(`Utility function tests`, func() {
It(`Invoke CreateMockByteArray() successfully`, func() {
mockByteArray := CreateMockByteArray("This is a test")
Expand Down

0 comments on commit a7070ad

Please sign in to comment.