Skip to content

Commit

Permalink
fix(Activity Tracker): change password field name to api_key (#217)
Browse files Browse the repository at this point in the history
Signed-off-by: Veena Rao <[email protected]>
  • Loading branch information
veenanr authored Nov 2, 2022
1 parent 4cc51ab commit 39d2d43
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
12 changes: 6 additions & 6 deletions atrackerv2/atracker_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ type EventstreamsEndpoint struct {
Topic *string `json:"topic" validate:"required"`

// The user password (api key) for the message hub topic in the Event Streams instance.
Password *string `json:"password" validate:"required"`
APIKey *string `json:"api_key" validate:"required"`
}

// UnmarshalEventstreamsEndpoint unmarshals an instance of EventstreamsEndpoint from the specified map of raw messages.
Expand All @@ -1433,7 +1433,7 @@ func UnmarshalEventstreamsEndpoint(m map[string]json.RawMessage, result interfac
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "password", &obj.Password)
err = core.UnmarshalPrimitive(m, "api_key", &obj.APIKey)
if err != nil {
return
}
Expand All @@ -1453,16 +1453,16 @@ type EventstreamsEndpointPrototype struct {
Topic *string `json:"topic" validate:"required"`

// The user password (api key) for the message hub topic in the Event Streams instance.
Password *string `json:"password" validate:"required"`
APIKey *string `json:"api_key" validate:"required"`
}

// NewEventstreamsEndpointPrototype : Instantiate EventstreamsEndpointPrototype (Generic Model Constructor)
func (*AtrackerV2) NewEventstreamsEndpointPrototype(targetCRN string, brokers []string, topic string, password string) (_model *EventstreamsEndpointPrototype, err error) {
func (*AtrackerV2) NewEventstreamsEndpointPrototype(targetCRN string, brokers []string, topic string, apiKey string) (_model *EventstreamsEndpointPrototype, err error) {
_model = &EventstreamsEndpointPrototype{
TargetCRN: core.StringPtr(targetCRN),
Brokers: brokers,
Topic: core.StringPtr(topic),
Password: core.StringPtr(password),
APIKey: core.StringPtr(apiKey),
}
err = core.ValidateStruct(_model, "required parameters")
return
Expand All @@ -1483,7 +1483,7 @@ func UnmarshalEventstreamsEndpointPrototype(m map[string]json.RawMessage, result
if err != nil {
return
}
err = core.UnmarshalPrimitive(m, "password", &obj.Password)
err = core.UnmarshalPrimitive(m, "api_key", &obj.APIKey)
if err != nil {
return
}
Expand Down
4 changes: 2 additions & 2 deletions atrackerv2/atracker_v2_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ var _ = Describe(`AtrackerV2 Integration Tests`, func() {
TargetCRN: core.StringPtr("crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"),
Topic: core.StringPtr("my-test-topic"),
Brokers: []string{"kafka-x:9094"},
Password: core.StringPtr("xxxxxxxxxxx"),
APIKey: core.StringPtr("xxxxxxxxxxx"),
}

createTargetOptions := &atrackerv2.CreateTargetOptions{
Expand Down Expand Up @@ -423,7 +423,7 @@ var _ = Describe(`AtrackerV2 Integration Tests`, func() {
TargetCRN: core.StringPtr("crn:v1:bluemix:public:messagehub:us-south:a/11111111111111111111111111111111:22222222-2222-2222-2222-222222222222::"),
Topic: core.StringPtr("my-test-topic"),
Brokers: []string{"kafka-x:9094"},
Password: core.StringPtr("xxxxxxxxxxxxx"),
APIKey: core.StringPtr("xxxxxxxxxxxxx"),
}

replaceTargetOptions := &atrackerv2.ReplaceTargetOptions{
Expand Down
Loading

0 comments on commit 39d2d43

Please sign in to comment.