Skip to content

Commit 972853e

Browse files
authoredAug 3, 2021
fix(Activity Tracker): re-gen service after recent service name change (#142)
1 parent 2863c92 commit 972853e

File tree

2 files changed

+47
-67
lines changed

2 files changed

+47
-67
lines changed
 

‎atrackerv1/atracker_v1.go

+39-43
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/*
18-
* IBM OpenAPI SDK Code Generator Version: 3.35.1-e449803c-20210628-211617
18+
* IBM OpenAPI SDK Code Generator Version: 3.36.1-694fc13e-20210723-211159
1919
*/
2020

2121
// Package atrackerv1 : Operations and models for the AtrackerV1 service
@@ -34,17 +34,17 @@ import (
3434
"github.com/go-openapi/strfmt"
3535
)
3636

37-
// AtrackerV1 : Activity Tracking is a platform service that you can configure in each region in your account to define
37+
// AtrackerV1 : Activity Tracker is a platform service that you can configure in each region in your account to define
3838
// how auditing events are collected and stored. Events are stored in a Cloud Object Storage bucket that is also
3939
// available in the account.
4040
//
41-
// Version: 1.0.0
41+
// Version: 1.1.0
4242
type AtrackerV1 struct {
4343
Service *core.BaseService
4444
}
4545

4646
// DefaultServiceURL is the default URL to make service requests to.
47-
const DefaultServiceURL = "https://private.us-south.atracker.cloud.ibm.com"
47+
const DefaultServiceURL = "https://us-south.atracker.cloud.ibm.com"
4848

4949
// DefaultServiceName is the default key used to find external configuration information.
5050
const DefaultServiceName = "atracker"
@@ -114,14 +114,10 @@ func NewAtrackerV1(options *AtrackerV1Options) (service *AtrackerV1, err error)
114114
// GetServiceURLForRegion returns the service URL to be used for the specified region
115115
func GetServiceURLForRegion(region string) (string, error) {
116116
var endpoints = map[string]string{
117-
"private.us-south": "https://private.us-south.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the us-south region.
118-
"private.us-east": "https://private.us-east.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the us-east region.
119-
"private.au-syd": "https://private.au-syd.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the au-syd region.
120-
"private.eu-de": "https://private.eu-de.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the eu-de region.
121-
"private.eu-gb": "https://private.eu-gb.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the eu-gb region.
122-
"private.in-che": "https://private.in-che.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the in-che region.
123-
"private.jp-tok": "https://private.jp-tok.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the jp-tok region.
124-
"private.kr-seo": "https://private.kr-seo.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracking Service in the kr-seo region.
117+
"us-south": "https://us-south.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracker Service in the us-south region.
118+
"private.us-south": "https://private.us-south.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracker Service in the us-south region.
119+
"us-east": "https://us-east.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracker Service in the us-east region.
120+
"private.us-east": "https://private.us-east.atracker.cloud.ibm.com", // The server for IBM Cloud Activity Tracker Service in the us-east region.
125121
}
126122

127123
if url, ok := endpoints[region]; ok {
@@ -872,8 +868,8 @@ func (atracker *AtrackerV1) DeleteRouteWithContext(ctx context.Context, deleteRo
872868
}
873869

874870
// GetEndpoints : Get endpoints
875-
// Get information about the public and private endpoints that are enabled in a region when you use the Activity
876-
// Tracking API.
871+
// Get information about the public and private endpoints that are enabled in a region when you use the Activity Tracker
872+
// API.
877873
func (atracker *AtrackerV1) GetEndpoints(getEndpointsOptions *GetEndpointsOptions) (result *Endpoints, response *core.DetailedResponse, err error) {
878874
return atracker.GetEndpointsWithContext(context.Background(), getEndpointsOptions)
879875
}
@@ -925,7 +921,7 @@ func (atracker *AtrackerV1) GetEndpointsWithContext(ctx context.Context, getEndp
925921
}
926922

927923
// PatchEndpoints : Modify endpoints
928-
// Configure the public endpoint availability in a region to use the Activity Tracking API. By default, the private
924+
// Configure the public endpoint availability in a region to use the Activity Tracker API. By default, the private
929925
// endpoint is enabled and cannot be disabled.
930926
func (atracker *AtrackerV1) PatchEndpoints(patchEndpointsOptions *PatchEndpointsOptions) (result *Endpoints, response *core.DetailedResponse, err error) {
931927
return atracker.PatchEndpointsWithContext(context.Background(), patchEndpointsOptions)
@@ -991,15 +987,15 @@ func (atracker *AtrackerV1) PatchEndpointsWithContext(ctx context.Context, patch
991987
return
992988
}
993989

994-
// APIEndpoint : Activity Tracking API endpoint.
990+
// APIEndpoint : Activity Tracker API endpoint.
995991
type APIEndpoint struct {
996-
// The public URL of Activity Tracking in a region.
992+
// The public URL of Activity Tracker in a region.
997993
PublicURL *string `json:"public_url" validate:"required"`
998994

999995
// Indicates whether or not the public endpoint is enabled in the account.
1000996
PublicEnabled *bool `json:"public_enabled" validate:"required"`
1001997

1002-
// The private URL of Activity Tracking. This URL cannot be disabled.
998+
// The private URL of Activity Tracker. This URL cannot be disabled.
1003999
PrivateURL *string `json:"private_url" validate:"required"`
10041000

10051001
// The private endpoint is always enabled.
@@ -1033,13 +1029,13 @@ func UnmarshalAPIEndpoint(m map[string]json.RawMessage, result interface{}) (err
10331029
type CreateRouteOptions struct {
10341030
// The name of the route. The name must be 1000 characters or less and cannot include any special characters other than
10351031
// `(space) - . _ :`.
1036-
Name *string `validate:"required"`
1032+
Name *string `json:"name" validate:"required"`
10371033

10381034
// Indicates whether or not all global events should be forwarded to this region.
1039-
ReceiveGlobalEvents *bool `validate:"required"`
1035+
ReceiveGlobalEvents *bool `json:"receive_global_events" validate:"required"`
10401036

10411037
// Routing rules that will be evaluated in their order of the array.
1042-
Rules []Rule `validate:"required"`
1038+
Rules []Rule `json:"rules" validate:"required"`
10431039

10441040
// Allows users to set headers on API requests
10451041
Headers map[string]string
@@ -1082,13 +1078,13 @@ func (options *CreateRouteOptions) SetHeaders(param map[string]string) *CreateRo
10821078
type CreateTargetOptions struct {
10831079
// The name of the target. The name must be 1000 characters or less, and cannot include any special characters other
10841080
// than `(space) - . _ :`.
1085-
Name *string `validate:"required"`
1081+
Name *string `json:"name" validate:"required"`
10861082

10871083
// The type of the target.
1088-
TargetType *string `validate:"required"`
1084+
TargetType *string `json:"target_type" validate:"required"`
10891085

10901086
// Property values for a Cloud Object Storage Endpoint.
1091-
CosEndpoint *CosEndpoint `validate:"required"`
1087+
CosEndpoint *CosEndpoint `json:"cos_endpoint" validate:"required"`
10921088

10931089
// Allows users to set headers on API requests
10941090
Headers map[string]string
@@ -1136,7 +1132,7 @@ func (options *CreateTargetOptions) SetHeaders(param map[string]string) *CreateT
11361132
// DeleteRouteOptions : The DeleteRoute options.
11371133
type DeleteRouteOptions struct {
11381134
// The v4 UUID that uniquely identifies the route.
1139-
ID *string `validate:"required,ne="`
1135+
ID *string `json:"-" validate:"required,ne="`
11401136

11411137
// Allows users to set headers on API requests
11421138
Headers map[string]string
@@ -1164,7 +1160,7 @@ func (options *DeleteRouteOptions) SetHeaders(param map[string]string) *DeleteRo
11641160
// DeleteTargetOptions : The DeleteTarget options.
11651161
type DeleteTargetOptions struct {
11661162
// The v4 UUID that uniquely identifies the target.
1167-
ID *string `validate:"required,ne="`
1163+
ID *string `json:"-" validate:"required,ne="`
11681164

11691165
// Allows users to set headers on API requests
11701166
Headers map[string]string
@@ -1189,9 +1185,9 @@ func (options *DeleteTargetOptions) SetHeaders(param map[string]string) *DeleteT
11891185
return options
11901186
}
11911187

1192-
// Endpoints : Activity Tracking endpoints.
1188+
// Endpoints : Activity Tracker endpoints.
11931189
type Endpoints struct {
1194-
// Activity Tracking API endpoint.
1190+
// Activity Tracker API endpoint.
11951191
APIEndpoint *APIEndpoint `json:"api_endpoint" validate:"required"`
11961192
}
11971193

@@ -1206,7 +1202,7 @@ func UnmarshalEndpoints(m map[string]json.RawMessage, result interface{}) (err e
12061202
return
12071203
}
12081204

1209-
// EndpointsRequestAPIEndpoint : Activity Tracking service API endpoint.
1205+
// EndpointsRequestAPIEndpoint : Activity Tracker service API endpoint.
12101206
type EndpointsRequestAPIEndpoint struct {
12111207
// Indicate whether or not the public endpoint is enabled in an account.
12121208
PublicEnabled *bool `json:"public_enabled,omitempty"`
@@ -1244,7 +1240,7 @@ func (options *GetEndpointsOptions) SetHeaders(param map[string]string) *GetEndp
12441240
// GetRouteOptions : The GetRoute options.
12451241
type GetRouteOptions struct {
12461242
// The v4 UUID that uniquely identifies the route.
1247-
ID *string `validate:"required,ne="`
1243+
ID *string `json:"-" validate:"required,ne="`
12481244

12491245
// Allows users to set headers on API requests
12501246
Headers map[string]string
@@ -1272,7 +1268,7 @@ func (options *GetRouteOptions) SetHeaders(param map[string]string) *GetRouteOpt
12721268
// GetTargetOptions : The GetTarget options.
12731269
type GetTargetOptions struct {
12741270
// The v4 UUID that uniquely identifies the target.
1275-
ID *string `validate:"required,ne="`
1271+
ID *string `json:"-" validate:"required,ne="`
12761272

12771273
// Allows users to set headers on API requests
12781274
Headers map[string]string
@@ -1335,8 +1331,8 @@ func (options *ListTargetsOptions) SetHeaders(param map[string]string) *ListTarg
13351331

13361332
// PatchEndpointsOptions : The PatchEndpoints options.
13371333
type PatchEndpointsOptions struct {
1338-
// Activity Tracking service API endpoint.
1339-
APIEndpoint *EndpointsRequestAPIEndpoint
1334+
// Activity Tracker service API endpoint.
1335+
APIEndpoint *EndpointsRequestAPIEndpoint `json:"api_endpoint,omitempty"`
13401336

13411337
// Allows users to set headers on API requests
13421338
Headers map[string]string
@@ -1362,17 +1358,17 @@ func (options *PatchEndpointsOptions) SetHeaders(param map[string]string) *Patch
13621358
// ReplaceRouteOptions : The ReplaceRoute options.
13631359
type ReplaceRouteOptions struct {
13641360
// The v4 UUID that uniquely identifies the route.
1365-
ID *string `validate:"required,ne="`
1361+
ID *string `json:"-" validate:"required,ne="`
13661362

13671363
// The name of the route. The name must be 1000 characters or less and cannot include any special characters other than
13681364
// `(space) - . _ :`.
1369-
Name *string `validate:"required"`
1365+
Name *string `json:"name" validate:"required"`
13701366

13711367
// Indicates whether or not all global events should be forwarded to this region.
1372-
ReceiveGlobalEvents *bool `validate:"required"`
1368+
ReceiveGlobalEvents *bool `json:"receive_global_events" validate:"required"`
13731369

13741370
// Routing rules that will be evaluated in their order of the array.
1375-
Rules []Rule `validate:"required"`
1371+
Rules []Rule `json:"rules" validate:"required"`
13761372

13771373
// Allows users to set headers on API requests
13781374
Headers map[string]string
@@ -1421,17 +1417,17 @@ func (options *ReplaceRouteOptions) SetHeaders(param map[string]string) *Replace
14211417
// ReplaceTargetOptions : The ReplaceTarget options.
14221418
type ReplaceTargetOptions struct {
14231419
// The v4 UUID that uniquely identifies the target.
1424-
ID *string `validate:"required,ne="`
1420+
ID *string `json:"-" validate:"required,ne="`
14251421

14261422
// The name of the target. The name must be 1000 characters or less, and cannot include any special characters other
14271423
// than `(space) - . _ :`.
1428-
Name *string `validate:"required"`
1424+
Name *string `json:"name" validate:"required"`
14291425

14301426
// The type of the target.
1431-
TargetType *string `validate:"required"`
1427+
TargetType *string `json:"target_type" validate:"required"`
14321428

14331429
// Property values for a Cloud Object Storage Endpoint.
1434-
CosEndpoint *CosEndpoint `validate:"required"`
1430+
CosEndpoint *CosEndpoint `json:"cos_endpoint" validate:"required"`
14351431

14361432
// Allows users to set headers on API requests
14371433
Headers map[string]string
@@ -1607,7 +1603,7 @@ type Target struct {
16071603
// The type of the target.
16081604
TargetType *string `json:"target_type" validate:"required"`
16091605

1610-
// The encryption key that is used to encrypt events before Activity Tracking services buffer them on storage. This
1606+
// The encryption key that is used to encrypt events before Activity Tracker services buffer them on storage. This
16111607
// credential is masked in the response.
16121608
EncryptKey *string `json:"encrypt_key,omitempty"`
16131609

@@ -1693,7 +1689,7 @@ func UnmarshalTargetList(m map[string]json.RawMessage, result interface{}) (err
16931689
// ValidateTargetOptions : The ValidateTarget options.
16941690
type ValidateTargetOptions struct {
16951691
// The v4 UUID that uniquely identifies the target.
1696-
ID *string `validate:"required,ne="`
1692+
ID *string `json:"-" validate:"required,ne="`
16971693

16981694
// Allows users to set headers on API requests
16991695
Headers map[string]string

‎atrackerv1/atracker_v1_test.go

+8-24
Original file line numberDiff line numberDiff line change
@@ -158,36 +158,20 @@ var _ = Describe(`AtrackerV1`, func() {
158158
It(`GetServiceURLForRegion(region string)`, func() {
159159
var url string
160160
var err error
161-
url, err = atrackerv1.GetServiceURLForRegion("private.us-south")
162-
Expect(url).To(Equal("https://private.us-south.atracker.cloud.ibm.com"))
163-
Expect(err).To(BeNil())
164-
165-
url, err = atrackerv1.GetServiceURLForRegion("private.us-east")
166-
Expect(url).To(Equal("https://private.us-east.atracker.cloud.ibm.com"))
167-
Expect(err).To(BeNil())
168-
169-
url, err = atrackerv1.GetServiceURLForRegion("private.au-syd")
170-
Expect(url).To(Equal("https://private.au-syd.atracker.cloud.ibm.com"))
161+
url, err = atrackerv1.GetServiceURLForRegion("us-south")
162+
Expect(url).To(Equal("https://us-south.atracker.cloud.ibm.com"))
171163
Expect(err).To(BeNil())
172164

173-
url, err = atrackerv1.GetServiceURLForRegion("private.eu-de")
174-
Expect(url).To(Equal("https://private.eu-de.atracker.cloud.ibm.com"))
175-
Expect(err).To(BeNil())
176-
177-
url, err = atrackerv1.GetServiceURLForRegion("private.eu-gb")
178-
Expect(url).To(Equal("https://private.eu-gb.atracker.cloud.ibm.com"))
179-
Expect(err).To(BeNil())
180-
181-
url, err = atrackerv1.GetServiceURLForRegion("private.in-che")
182-
Expect(url).To(Equal("https://private.in-che.atracker.cloud.ibm.com"))
165+
url, err = atrackerv1.GetServiceURLForRegion("private.us-south")
166+
Expect(url).To(Equal("https://private.us-south.atracker.cloud.ibm.com"))
183167
Expect(err).To(BeNil())
184168

185-
url, err = atrackerv1.GetServiceURLForRegion("private.jp-tok")
186-
Expect(url).To(Equal("https://private.jp-tok.atracker.cloud.ibm.com"))
169+
url, err = atrackerv1.GetServiceURLForRegion("us-east")
170+
Expect(url).To(Equal("https://us-east.atracker.cloud.ibm.com"))
187171
Expect(err).To(BeNil())
188172

189-
url, err = atrackerv1.GetServiceURLForRegion("private.kr-seo")
190-
Expect(url).To(Equal("https://private.kr-seo.atracker.cloud.ibm.com"))
173+
url, err = atrackerv1.GetServiceURLForRegion("private.us-east")
174+
Expect(url).To(Equal("https://private.us-east.atracker.cloud.ibm.com"))
191175
Expect(err).To(BeNil())
192176

193177
url, err = atrackerv1.GetServiceURLForRegion("INVALID_REGION")

0 commit comments

Comments
 (0)
Please sign in to comment.