Skip to content

Commit

Permalink
[feat] enhance api create volume
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed May 30, 2024
1 parent 9763e11 commit db139bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions vngcloud/services/volume/v2/blockvolume_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,22 @@ func (s *CreateBlockVolumeRequest) ToMap() map[string]interface{} {
}
}

func (s *CreateBlockVolumeRequest) GetListParameters() []interface{} {
return []interface{}{
"backupVolumePointId", s.BackupVolumePointId,
"createdFrom", s.CreatedFrom,
"encryptionType", s.EncryptionType,
"multiAttach", s.MultiAttach,
"name", s.Name,
"size", s.Size,
"volumeTypeId", s.VolumeTypeId,
"tags", s.Tags,
"isPoc", s.IsPoc,
"isEnableAutoRenew", s.IsEnableAutoRenew,
"configVolumeRestore", s.ConfigureVolumeRestore,
}
}

func (s *CreateBlockVolumeRequest) WithPoc(pisPoc bool) ICreateBlockVolumeRequest {
s.IsPoc = pisPoc
return s
Expand Down
1 change: 1 addition & 0 deletions vngcloud/services/volume/v2/irequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package v2
type ICreateBlockVolumeRequest interface {
ToRequestBody() interface{}
ToMap() map[string]interface{}
GetListParameters() []interface{}
WithPoc(pisPoc bool) ICreateBlockVolumeRequest
WithAutoRenew(pval bool) ICreateBlockVolumeRequest
WithMultiAttach(pmultiAttach bool) ICreateBlockVolumeRequest
Expand Down

0 comments on commit db139bb

Please sign in to comment.