Skip to content

Commit c7d22a3

Browse files
authored
Updating to BP API 5.2 commit 1755379 (#116)
1 parent 90736d6 commit c7d22a3

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

ds3/ds3Gets.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func (client *Client) GetObject(request *models.GetObjectRequest) (*models.GetOb
2323
httpRequest, err := networking.NewHttpRequestBuilder().
2424
WithHttpVerb(HTTP_VERB_GET).
2525
WithPath("/" + request.BucketName + "/" + request.ObjectName).
26+
WithOptionalVoidQueryParam("cached_only", request.CachedOnly).
2627
WithOptionalQueryParam("job", request.Job).
2728
WithOptionalQueryParam("offset", networking.Int64PtrToStrPtr(request.Offset)).
2829
WithOptionalQueryParam("version_id", request.VersionId).

ds3/ds3Posts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,7 @@ func (client *Client) RegisterS3TargetSpectraS3(request *models.RegisterS3Target
13411341
WithOptionalQueryParam("proxy_port", networking.IntPtrToStrPtr(request.ProxyPort)).
13421342
WithOptionalQueryParam("proxy_username", request.ProxyUsername).
13431343
WithOptionalQueryParam("region", networking.InterfaceToStrPtr(request.Region)).
1344+
WithOptionalQueryParam("restricted_access", networking.BoolPtrToStrPtr(request.RestrictedAccess)).
13441345
WithOptionalQueryParam("staged_data_expiration_in_days", networking.IntPtrToStrPtr(request.StagedDataExpirationInDays)).
13451346
Build(client.connectionInfo)
13461347

ds3/ds3Puts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2596,6 +2596,7 @@ func (client *Client) ModifyS3TargetSpectraS3(request *models.ModifyS3TargetSpec
25962596
WithOptionalQueryParam("proxy_username", request.ProxyUsername).
25972597
WithOptionalQueryParam("quiesced", networking.InterfaceToStrPtr(request.Quiesced)).
25982598
WithOptionalQueryParam("region", networking.InterfaceToStrPtr(request.Region)).
2599+
WithOptionalQueryParam("restricted_access", networking.BoolPtrToStrPtr(request.RestrictedAccess)).
25992600
WithOptionalQueryParam("secret_key", request.SecretKey).
26002601
WithOptionalQueryParam("staged_data_expiration_in_days", networking.IntPtrToStrPtr(request.StagedDataExpirationInDays)).
26012602
Build(client.connectionInfo)

ds3/models/requests.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ type Range struct {
258258
type GetObjectRequest struct {
259259
BucketName string
260260
ObjectName string
261+
CachedOnly bool
261262
Checksum Checksum
262263
Job *string
263264
Metadata map[string]string
@@ -274,6 +275,11 @@ func NewGetObjectRequest(bucketName string, objectName string) *GetObjectRequest
274275
}
275276
}
276277

278+
func (getObjectRequest *GetObjectRequest) WithCachedOnly() *GetObjectRequest {
279+
getObjectRequest.CachedOnly = true
280+
return getObjectRequest
281+
}
282+
277283
func (getObjectRequest *GetObjectRequest) WithJob(job string) *GetObjectRequest {
278284
getObjectRequest.Job = &job
279285
return getObjectRequest
@@ -9358,6 +9364,7 @@ type ModifyS3TargetSpectraS3Request struct {
93589364
ProxyUsername *string
93599365
Quiesced Quiesced
93609366
Region S3Region
9367+
RestrictedAccess *bool
93619368
S3Target string
93629369
SecretKey *string
93639370
StagedDataExpirationInDays *int
@@ -9459,6 +9466,11 @@ func (modifyS3TargetSpectraS3Request *ModifyS3TargetSpectraS3Request) WithRegion
94599466
return modifyS3TargetSpectraS3Request
94609467
}
94619468

9469+
func (modifyS3TargetSpectraS3Request *ModifyS3TargetSpectraS3Request) WithRestrictedAccess(restrictedAccess bool) *ModifyS3TargetSpectraS3Request {
9470+
modifyS3TargetSpectraS3Request.RestrictedAccess = &restrictedAccess
9471+
return modifyS3TargetSpectraS3Request
9472+
}
9473+
94629474
func (modifyS3TargetSpectraS3Request *ModifyS3TargetSpectraS3Request) WithSecretKey(secretKey string) *ModifyS3TargetSpectraS3Request {
94639475
modifyS3TargetSpectraS3Request.SecretKey = &secretKey
94649476
return modifyS3TargetSpectraS3Request
@@ -9487,6 +9499,7 @@ type RegisterS3TargetSpectraS3Request struct {
94879499
ProxyPort *int
94889500
ProxyUsername *string
94899501
Region S3Region
9502+
RestrictedAccess *bool
94909503
SecretKey string
94919504
StagedDataExpirationInDays *int
94929505
}
@@ -9574,6 +9587,11 @@ func (registerS3TargetSpectraS3Request *RegisterS3TargetSpectraS3Request) WithRe
95749587
return registerS3TargetSpectraS3Request
95759588
}
95769589

9590+
func (registerS3TargetSpectraS3Request *RegisterS3TargetSpectraS3Request) WithRestrictedAccess(restrictedAccess bool) *RegisterS3TargetSpectraS3Request {
9591+
registerS3TargetSpectraS3Request.RestrictedAccess = &restrictedAccess
9592+
return registerS3TargetSpectraS3Request
9593+
}
9594+
95779595
func (registerS3TargetSpectraS3Request *RegisterS3TargetSpectraS3Request) WithStagedDataExpirationInDays(stagedDataExpirationInDays int) *RegisterS3TargetSpectraS3Request {
95789596
registerS3TargetSpectraS3Request.StagedDataExpirationInDays = &stagedDataExpirationInDays
95799597
return registerS3TargetSpectraS3Request

ds3/models/responseModels.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4028,6 +4028,7 @@ const (
40284028
TAPE_DRIVE_TYPE_LTO6 TapeDriveType = 1 + iota
40294029
TAPE_DRIVE_TYPE_LTO7 TapeDriveType = 1 + iota
40304030
TAPE_DRIVE_TYPE_LTO8 TapeDriveType = 1 + iota
4031+
TAPE_DRIVE_TYPE_LTO9 TapeDriveType = 1 + iota
40314032
TAPE_DRIVE_TYPE_TS1140 TapeDriveType = 1 + iota
40324033
TAPE_DRIVE_TYPE_TS1150 TapeDriveType = 1 + iota
40334034
TAPE_DRIVE_TYPE_TS1155 TapeDriveType = 1 + iota
@@ -4043,6 +4044,7 @@ func (tapeDriveType *TapeDriveType) UnmarshalText(text []byte) error {
40434044
case "LTO6": *tapeDriveType = TAPE_DRIVE_TYPE_LTO6
40444045
case "LTO7": *tapeDriveType = TAPE_DRIVE_TYPE_LTO7
40454046
case "LTO8": *tapeDriveType = TAPE_DRIVE_TYPE_LTO8
4047+
case "LTO9": *tapeDriveType = TAPE_DRIVE_TYPE_LTO9
40464048
case "TS1140": *tapeDriveType = TAPE_DRIVE_TYPE_TS1140
40474049
case "TS1150": *tapeDriveType = TAPE_DRIVE_TYPE_TS1150
40484050
case "TS1155": *tapeDriveType = TAPE_DRIVE_TYPE_TS1155
@@ -4061,6 +4063,7 @@ func (tapeDriveType TapeDriveType) String() string {
40614063
case TAPE_DRIVE_TYPE_LTO6: return "LTO6"
40624064
case TAPE_DRIVE_TYPE_LTO7: return "LTO7"
40634065
case TAPE_DRIVE_TYPE_LTO8: return "LTO8"
4066+
case TAPE_DRIVE_TYPE_LTO9: return "LTO9"
40644067
case TAPE_DRIVE_TYPE_TS1140: return "TS1140"
40654068
case TAPE_DRIVE_TYPE_TS1150: return "TS1150"
40664069
case TAPE_DRIVE_TYPE_TS1155: return "TS1155"
@@ -4939,6 +4942,7 @@ type S3Target struct {
49394942
ProxyUsername *string
49404943
Quiesced Quiesced
49414944
Region *S3Region
4945+
RestrictedAccess bool
49424946
SecretKey *string
49434947
StagedDataExpirationInDays int
49444948
State TargetState
@@ -4989,6 +4993,8 @@ func (s3Target *S3Target) parse(xmlNode *XmlNode, aggErr *AggregateError) {
49894993
parseEnum(child.Content, &s3Target.Quiesced, aggErr)
49904994
case "Region":
49914995
s3Target.Region = newS3RegionFromContent(child.Content, aggErr)
4996+
case "RestrictedAccess":
4997+
s3Target.RestrictedAccess = parseBool(child.Content, aggErr)
49924998
case "SecretKey":
49934999
s3Target.SecretKey = parseNullableString(child.Content)
49945000
case "StagedDataExpirationInDays":

0 commit comments

Comments
 (0)