diff --git a/atrackerv1/atracker_v1.go b/atrackerv1/atracker_v1.go index 0d0b5940..717fdc1b 100644 --- a/atrackerv1/atracker_v1.go +++ b/atrackerv1/atracker_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-629bbb97-20201207-171303 + * IBM OpenAPI SDK Code Generator Version: 99-SNAPSHOT-d753183b-20201209-145823 */ @@ -35,7 +35,7 @@ import ( // AtrackerV1 : IBM Cloud Activity Tracking Service (ATracker Service for short) is an activity tracker configuration // service for your application events as well as events from IBM services under your account. It is designed to enable -// you to route activity tracker events to your designated Cloud Object Storage location in different regions. +// you to route activity tracker events to your designated Cloud Object Storage location in different regions. // // Version: 1.0.0 type AtrackerV1 struct { @@ -176,10 +176,10 @@ func (atracker *AtrackerV1) DisableRetries() { } // CreateTarget : Create a Cloud Object Storage target for a region -// Creates a new Cloud Object Storage (COS) target with specified COS endpoint information and credentials. Commonly -// the COS endpoint should be on the same region as ATracker Services where this API is invoked. The Target definition -// could only be referenced by the routing rules defined in the same region through the same API endpoint. If a COS -// endpoint to be used across multiple regions, you must define a target for each region's API endpoint. +// Creates a new Cloud Object Storage (COS) target with specified COS endpoint information and credentials. Commonly the +// COS endpoint should be on the same region as ATracker Services where this API is invoked. The Target definition could +// only be referenced by the routing rules defined in the same region through the same API endpoint. If a COS endpoint +// to be used across multiple regions, you must define a target for each region's API endpoint. func (atracker *AtrackerV1) CreateTarget(createTargetOptions *CreateTargetOptions) (result *Target, response *core.DetailedResponse, err error) { return atracker.CreateTargetWithContext(context.Background(), createTargetOptions) } @@ -479,7 +479,7 @@ func (atracker *AtrackerV1) DeleteTargetWithContext(ctx context.Context, deleteT } // CreateRoute : Create a Route for the region -// Creates a route with rules defined how to route AT events to targets for a region. For each account and region, only +// Creates a route with rules defined how to route AT events to targets for a region. For each account and region, only // one route could be defined. A route could contain multiple rules which enable atracker service to match incoming AT // events based on the source crn and forward the events to customer configured targets. func (atracker *AtrackerV1) CreateRoute(createRouteOptions *CreateRouteOptions) (result *Route, response *core.DetailedResponse, err error) { @@ -1358,7 +1358,7 @@ type CosEndpoint struct { Bucket *string `json:"bucket" validate:"required"` // The IAM Api key that have writer access to this cos instance. This credential will be masked in the response. - ApiKey *string `json:"api_key" validate:"required"` + APIKey *string `json:"api_key" validate:"required"` } @@ -1368,7 +1368,7 @@ func (*AtrackerV1) NewCosEndpoint(endpoint string, targetCRN string, bucket stri Endpoint: core.StringPtr(endpoint), TargetCRN: core.StringPtr(targetCRN), Bucket: core.StringPtr(bucket), - ApiKey: core.StringPtr(apiKey), + APIKey: core.StringPtr(apiKey), } err = core.ValidateStruct(model, "required parameters") return @@ -1389,7 +1389,7 @@ func UnmarshalCosEndpoint(m map[string]json.RawMessage, result interface{}) (err if err != nil { return } - err = core.UnmarshalPrimitive(m, "api_key", &obj.ApiKey) + err = core.UnmarshalPrimitive(m, "api_key", &obj.APIKey) if err != nil { return } diff --git a/atrackerv1/atracker_v1_examples_test.go b/atrackerv1/atracker_v1_examples_test.go index 74918578..e895d8cf 100644 --- a/atrackerv1/atracker_v1_examples_test.go +++ b/atrackerv1/atracker_v1_examples_test.go @@ -21,20 +21,25 @@ package atrackerv1_test import ( "encoding/json" "fmt" - "os" - "github.com/IBM/go-sdk-core/v4/core" "github.com/IBM/platform-services-go-sdk/atrackerv1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "os" ) const externalConfigFile = "../atracker_v1.env" var ( atrackerService *atrackerv1.AtrackerV1 - config map[string]string - configLoaded bool = false + config map[string]string + configLoaded bool = false +) + +// Globlal variables to hold link values +var ( + routeIDLink string + targetIDLink string ) func shouldSkipTest() { @@ -44,12 +49,6 @@ func shouldSkipTest() { } var _ = Describe(`AtrackerV1 Examples Tests`, func() { - - var ( - targetID string - routeID string - ) - Describe(`External configuration`, func() { It("Successfully load the configuration", func() { var err error @@ -99,15 +98,15 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { // begin-create_target cosEndpointModel := &atrackerv1.CosEndpoint{ - Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), + Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), TargetCRN: core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"), - Bucket: core.StringPtr("my-atracker-bucket"), - ApiKey: core.StringPtr("xxxxxxxxxxxxxx"), + Bucket: core.StringPtr("my-atracker-bucket"), + APIKey: core.StringPtr("xxxxxxxxxxxxxx"), } createTargetOptions := atrackerService.NewCreateTargetOptions( "my-cos-target", - atrackerv1.CreateTargetOptionsTargetTypeCloudObjectStorageConst, + "cloud_object_storage", cosEndpointModel, ) @@ -123,7 +122,8 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { Expect(err).To(BeNil()) Expect(response.StatusCode).To(Equal(201)) Expect(target).ToNot(BeNil()) - targetID = *target.ID + + targetIDLink = *target.ID; }) It(`ListTargets request example`, func() { @@ -149,7 +149,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { // begin-get_target getTargetOptions := atrackerService.NewGetTargetOptions( - targetID, + targetIDLink, ) target, response, err := atrackerService.GetTarget(getTargetOptions) @@ -170,16 +170,16 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { // begin-replace_target cosEndpointModel := &atrackerv1.CosEndpoint{ - Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), + Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), TargetCRN: core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"), - Bucket: core.StringPtr("my-atracker-bucket"), - ApiKey: core.StringPtr("xxxxxxxxxxxxxx"), + Bucket: core.StringPtr("my-atracker-bucket"), + APIKey: core.StringPtr("xxxxxxxxxxxxxx"), } replaceTargetOptions := atrackerService.NewReplaceTargetOptions( - targetID, + targetIDLink, "my-cos-target-modified", - atrackerv1.CreateTargetOptionsTargetTypeCloudObjectStorageConst, + "cloud_object_storage", cosEndpointModel, ) @@ -201,7 +201,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { // begin-create_route ruleModel := &atrackerv1.Rule{ - TargetIds: []string{targetID}, + TargetIds: []string{targetIDLink}, } createRouteOptions := atrackerService.NewCreateRouteOptions( @@ -222,7 +222,9 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { Expect(err).To(BeNil()) Expect(response.StatusCode).To(Equal(201)) Expect(route).ToNot(BeNil()) - routeID = *route.ID + + routeIDLink = *route.ID; + }) It(`ListRoutes request example`, func() { // begin-list_routes @@ -247,7 +249,7 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { // begin-get_route getRouteOptions := atrackerService.NewGetRouteOptions( - routeID, + routeIDLink, ) route, response, err := atrackerService.GetRoute(getRouteOptions) @@ -268,11 +270,11 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { // begin-replace_route ruleModel := &atrackerv1.Rule{ - TargetIds: []string{"c3af557f-fb0e-4476-85c3-0889e7fe7bc4"}, + TargetIds: []string{targetIDLink}, } replaceRouteOptions := atrackerService.NewReplaceRouteOptions( - routeID, + routeIDLink, "my-route-modified", false, []atrackerv1.Rule{*ruleModel}, @@ -292,12 +294,11 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { Expect(route).ToNot(BeNil()) }) - //delete route first It(`DeleteRoute request example`, func() { // begin-delete_route deleteRouteOptions := atrackerService.NewDeleteRouteOptions( - routeID, + routeIDLink, ) response, err := atrackerService.DeleteRoute(deleteRouteOptions) @@ -311,12 +312,11 @@ var _ = Describe(`AtrackerV1 Examples Tests`, func() { Expect(response.StatusCode).To(Equal(204)) }) - //then delete target It(`DeleteTarget request example`, func() { // begin-delete_target deleteTargetOptions := atrackerService.NewDeleteTargetOptions( - targetID, + targetIDLink, ) response, err := atrackerService.DeleteTarget(deleteTargetOptions) diff --git a/atrackerv1/atracker_v1_integration_test.go b/atrackerv1/atracker_v1_integration_test.go index 4910400a..7ac80438 100644 --- a/atrackerv1/atracker_v1_integration_test.go +++ b/atrackerv1/atracker_v1_integration_test.go @@ -20,12 +20,11 @@ package atrackerv1_test import ( "fmt" - "os" - "github.com/IBM/go-sdk-core/v4/core" "github.com/IBM/platform-services-go-sdk/atrackerv1" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "os" ) /** @@ -41,15 +40,16 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { const externalConfigFile = "../atracker_v1.env" var ( - err error + err error atrackerService *atrackerv1.AtrackerV1 - serviceURL string - config map[string]string + serviceURL string + config map[string]string ) + // Globlal variables to hold link values var ( - targetID string - routeID string + routeIDLink string + targetIDLink string ) var shouldSkipTest = func() { @@ -101,15 +101,15 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`CreateTarget(createTargetOptions *CreateTargetOptions)`, func() { cosEndpointModel := &atrackerv1.CosEndpoint{ - Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), + Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), TargetCRN: core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"), - Bucket: core.StringPtr("my-atracker-bucket"), - ApiKey: core.StringPtr("xxxxxxxxxxxxxx"), + Bucket: core.StringPtr("my-atracker-bucket"), + APIKey: core.StringPtr("xxxxxxxxxxxxxx"), } createTargetOptions := &atrackerv1.CreateTargetOptions{ - Name: core.StringPtr("my-cos-target"), - TargetType: core.StringPtr(atrackerv1.CreateTargetOptionsTargetTypeCloudObjectStorageConst), + Name: core.StringPtr("my-cos-target"), + TargetType: core.StringPtr("cloud_object_storage"), CosEndpoint: cosEndpointModel, } @@ -118,7 +118,9 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { Expect(err).To(BeNil()) Expect(response.StatusCode).To(Equal(201)) Expect(target).ToNot(BeNil()) - targetID = *target.ID + + targetIDLink = *target.ID; + }) }) @@ -128,7 +130,8 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { }) It(`ListTargets(listTargetsOptions *ListTargetsOptions)`, func() { - listTargetsOptions := &atrackerv1.ListTargetsOptions{} + listTargetsOptions := &atrackerv1.ListTargetsOptions{ + } targetList, response, err := atrackerService.ListTargets(listTargetsOptions) @@ -136,6 +139,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { Expect(response.StatusCode).To(Equal(200)) Expect(targetList).ToNot(BeNil()) Expect(len(targetList.Targets)).To(BeNumerically(">", 0)) + }) }) @@ -146,7 +150,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`GetTarget(getTargetOptions *GetTargetOptions)`, func() { getTargetOptions := &atrackerv1.GetTargetOptions{ - ID: core.StringPtr(targetID), + ID: core.StringPtr(targetIDLink), } target, response, err := atrackerService.GetTarget(getTargetOptions) @@ -155,6 +159,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { Expect(response.StatusCode).To(Equal(200)) Expect(target).ToNot(BeNil()) Expect(*target.Name).To(Equal("my-cos-target")) + }) }) @@ -165,16 +170,16 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`ReplaceTarget(replaceTargetOptions *ReplaceTargetOptions)`, func() { cosEndpointModel := &atrackerv1.CosEndpoint{ - Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), + Endpoint: core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"), TargetCRN: core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"), - Bucket: core.StringPtr("my-atracker-bucket"), - ApiKey: core.StringPtr("xxxxxxxxxxxxxx"), + Bucket: core.StringPtr("my-atracker-bucket"), + APIKey: core.StringPtr("xxxxxxxxxxxxxx"), } replaceTargetOptions := &atrackerv1.ReplaceTargetOptions{ - ID: core.StringPtr(targetID), - Name: core.StringPtr("my-cos-target-modified"), - TargetType: core.StringPtr("cos"), + ID: core.StringPtr(targetIDLink), + Name: core.StringPtr("my-cos-target-modified"), + TargetType: core.StringPtr("cloud_object_storage"), CosEndpoint: cosEndpointModel, } @@ -184,6 +189,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { Expect(response.StatusCode).To(Equal(200)) Expect(target).ToNot(BeNil()) Expect(*target.Name).To(Equal("my-cos-target-modified")) + }) }) @@ -194,13 +200,13 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`CreateRoute(createRouteOptions *CreateRouteOptions)`, func() { ruleModel := &atrackerv1.Rule{ - TargetIds: []string{targetID}, + TargetIds: []string{targetIDLink}, } createRouteOptions := &atrackerv1.CreateRouteOptions{ - Name: core.StringPtr("my-route"), + Name: core.StringPtr("my-route"), ReceiveGlobalEvents: core.BoolPtr(false), - Rules: []atrackerv1.Rule{*ruleModel}, + Rules: []atrackerv1.Rule{*ruleModel}, } route, response, err := atrackerService.CreateRoute(createRouteOptions) @@ -208,7 +214,9 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { Expect(err).To(BeNil()) Expect(response.StatusCode).To(Equal(201)) Expect(route).ToNot(BeNil()) - routeID = *route.ID + + routeIDLink = *route.ID; + }) }) @@ -218,7 +226,8 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { }) It(`ListRoutes(listRoutesOptions *ListRoutesOptions)`, func() { - listRoutesOptions := &atrackerv1.ListRoutesOptions{} + listRoutesOptions := &atrackerv1.ListRoutesOptions{ + } routeList, response, err := atrackerService.ListRoutes(listRoutesOptions) @@ -237,7 +246,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`GetRoute(getRouteOptions *GetRouteOptions)`, func() { getRouteOptions := &atrackerv1.GetRouteOptions{ - ID: core.StringPtr(routeID), + ID: core.StringPtr(routeIDLink), } route, response, err := atrackerService.GetRoute(getRouteOptions) @@ -246,6 +255,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { Expect(response.StatusCode).To(Equal(200)) Expect(route).ToNot(BeNil()) Expect(*route.Name).To(Equal("my-route")) + }) }) @@ -256,14 +266,14 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`ReplaceRoute(replaceRouteOptions *ReplaceRouteOptions)`, func() { ruleModel := &atrackerv1.Rule{ - TargetIds: []string{targetID}, + TargetIds: []string{targetIDLink}, } replaceRouteOptions := &atrackerv1.ReplaceRouteOptions{ - ID: core.StringPtr(routeID), - Name: core.StringPtr("my-route-modified"), + ID: core.StringPtr(routeIDLink), + Name: core.StringPtr("my-route-modified"), ReceiveGlobalEvents: core.BoolPtr(false), - Rules: []atrackerv1.Rule{*ruleModel}, + Rules: []atrackerv1.Rule{*ruleModel}, } route, response, err := atrackerService.ReplaceRoute(replaceRouteOptions) @@ -272,10 +282,10 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { Expect(response.StatusCode).To(Equal(200)) Expect(route).ToNot(BeNil()) Expect(*route.Name).To(Equal("my-route-modified")) + }) }) - // delete route first Describe(`DeleteRoute - Delete a route`, func() { BeforeEach(func() { shouldSkipTest() @@ -283,7 +293,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`DeleteRoute(deleteRouteOptions *DeleteRouteOptions)`, func() { deleteRouteOptions := &atrackerv1.DeleteRouteOptions{ - ID: core.StringPtr(routeID), + ID: core.StringPtr(routeIDLink), } response, err := atrackerService.DeleteRoute(deleteRouteOptions) @@ -294,7 +304,6 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { }) }) - // then delete target Describe(`DeleteTarget - Delete a target`, func() { BeforeEach(func() { shouldSkipTest() @@ -302,7 +311,7 @@ var _ = Describe(`AtrackerV1 Integration Tests`, func() { It(`DeleteTarget(deleteTargetOptions *DeleteTargetOptions)`, func() { deleteTargetOptions := &atrackerv1.DeleteTargetOptions{ - ID: core.StringPtr(targetID), + ID: core.StringPtr(targetIDLink), } response, err := atrackerService.DeleteTarget(deleteTargetOptions) diff --git a/atrackerv1/atracker_v1_test.go b/atrackerv1/atracker_v1_test.go index 0014266a..9e4376c7 100644 --- a/atrackerv1/atracker_v1_test.go +++ b/atrackerv1/atracker_v1_test.go @@ -223,7 +223,7 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") // Construct an instance of the CreateTargetOptions model createTargetOptionsModel := new(atrackerv1.CreateTargetOptions) @@ -308,7 +308,7 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") // Construct an instance of the CreateTargetOptions model createTargetOptionsModel := new(atrackerv1.CreateTargetOptions) @@ -361,7 +361,7 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") // Construct an instance of the CreateTargetOptions model createTargetOptionsModel := new(atrackerv1.CreateTargetOptions) @@ -712,7 +712,7 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") // Construct an instance of the ReplaceTargetOptions model replaceTargetOptionsModel := new(atrackerv1.ReplaceTargetOptions) @@ -798,7 +798,7 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") // Construct an instance of the ReplaceTargetOptions model replaceTargetOptionsModel := new(atrackerv1.ReplaceTargetOptions) @@ -852,7 +852,7 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") // Construct an instance of the ReplaceTargetOptions model replaceTargetOptionsModel := new(atrackerv1.ReplaceTargetOptions) @@ -1898,11 +1898,11 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") Expect(cosEndpointModel.Endpoint).To(Equal(core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"))) Expect(cosEndpointModel.TargetCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"))) Expect(cosEndpointModel.Bucket).To(Equal(core.StringPtr("my-atracker-bucket"))) - Expect(cosEndpointModel.ApiKey).To(Equal(core.StringPtr("xxxxxxxxxxxxxx"))) + Expect(cosEndpointModel.APIKey).To(Equal(core.StringPtr("xxxxxxxxxxxxxx"))) // Construct an instance of the CreateTargetOptions model createTargetOptionsName := "my-cos-target" @@ -2005,11 +2005,11 @@ var _ = Describe(`AtrackerV1`, func() { cosEndpointModel.Endpoint = core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud") cosEndpointModel.TargetCRN = core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::") cosEndpointModel.Bucket = core.StringPtr("my-atracker-bucket") - cosEndpointModel.ApiKey = core.StringPtr("xxxxxxxxxxxxxx") + cosEndpointModel.APIKey = core.StringPtr("xxxxxxxxxxxxxx") Expect(cosEndpointModel.Endpoint).To(Equal(core.StringPtr("s3.private.us-east.cloud-object-storage.appdomain.cloud"))) Expect(cosEndpointModel.TargetCRN).To(Equal(core.StringPtr("crn:v1:bluemix:public:cloud-object-storage:global:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"))) Expect(cosEndpointModel.Bucket).To(Equal(core.StringPtr("my-atracker-bucket"))) - Expect(cosEndpointModel.ApiKey).To(Equal(core.StringPtr("xxxxxxxxxxxxxx"))) + Expect(cosEndpointModel.APIKey).To(Equal(core.StringPtr("xxxxxxxxxxxxxx"))) // Construct an instance of the ReplaceTargetOptions model id := "testString"