feat: replication bucket name (#440)

* chore: gofmt

* chore: update openapi gen files

* feat: add replication-bucket-name flag

* fix: fix tests

* chore: rename to replication-bucket

* feat: show remote bucket name or id

* chore: fmt fixup

* chore: update openapi to master

* chore: fix openapi generation
This commit is contained in:
Jeffrey Smith II
2022-08-18 14:21:50 -04:00
committed by GitHub
parent 051a6aafc4
commit 5c7c34f16d
22 changed files with 420 additions and 218 deletions

View File

@ -21,7 +21,8 @@ type ReplicationCreationRequest struct {
OrgID string `json:"orgID" yaml:"orgID"`
RemoteID string `json:"remoteID" yaml:"remoteID"`
LocalBucketID string `json:"localBucketID" yaml:"localBucketID"`
RemoteBucketID string `json:"remoteBucketID" yaml:"remoteBucketID"`
RemoteBucketID *string `json:"remoteBucketID,omitempty" yaml:"remoteBucketID,omitempty"`
RemoteBucketName *string `json:"remoteBucketName,omitempty" yaml:"remoteBucketName,omitempty"`
MaxQueueSizeBytes int64 `json:"maxQueueSizeBytes" yaml:"maxQueueSizeBytes"`
DropNonRetryableData *bool `json:"dropNonRetryableData,omitempty" yaml:"dropNonRetryableData,omitempty"`
MaxAgeSeconds int64 `json:"maxAgeSeconds" yaml:"maxAgeSeconds"`
@ -31,13 +32,12 @@ type ReplicationCreationRequest struct {
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewReplicationCreationRequest(name string, orgID string, remoteID string, localBucketID string, remoteBucketID string, maxQueueSizeBytes int64, maxAgeSeconds int64) *ReplicationCreationRequest {
func NewReplicationCreationRequest(name string, orgID string, remoteID string, localBucketID string, maxQueueSizeBytes int64, maxAgeSeconds int64) *ReplicationCreationRequest {
this := ReplicationCreationRequest{}
this.Name = name
this.OrgID = orgID
this.RemoteID = remoteID
this.LocalBucketID = localBucketID
this.RemoteBucketID = remoteBucketID
this.MaxQueueSizeBytes = maxQueueSizeBytes
var dropNonRetryableData bool = false
this.DropNonRetryableData = &dropNonRetryableData
@ -187,28 +187,68 @@ func (o *ReplicationCreationRequest) SetLocalBucketID(v string) {
o.LocalBucketID = v
}
// GetRemoteBucketID returns the RemoteBucketID field value
// GetRemoteBucketID returns the RemoteBucketID field value if set, zero value otherwise.
func (o *ReplicationCreationRequest) GetRemoteBucketID() string {
if o == nil {
if o == nil || o.RemoteBucketID == nil {
var ret string
return ret
}
return o.RemoteBucketID
return *o.RemoteBucketID
}
// GetRemoteBucketIDOk returns a tuple with the RemoteBucketID field value
// GetRemoteBucketIDOk returns a tuple with the RemoteBucketID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReplicationCreationRequest) GetRemoteBucketIDOk() (*string, bool) {
if o == nil {
if o == nil || o.RemoteBucketID == nil {
return nil, false
}
return &o.RemoteBucketID, true
return o.RemoteBucketID, true
}
// SetRemoteBucketID sets field value
// HasRemoteBucketID returns a boolean if a field has been set.
func (o *ReplicationCreationRequest) HasRemoteBucketID() bool {
if o != nil && o.RemoteBucketID != nil {
return true
}
return false
}
// SetRemoteBucketID gets a reference to the given string and assigns it to the RemoteBucketID field.
func (o *ReplicationCreationRequest) SetRemoteBucketID(v string) {
o.RemoteBucketID = v
o.RemoteBucketID = &v
}
// GetRemoteBucketName returns the RemoteBucketName field value if set, zero value otherwise.
func (o *ReplicationCreationRequest) GetRemoteBucketName() string {
if o == nil || o.RemoteBucketName == nil {
var ret string
return ret
}
return *o.RemoteBucketName
}
// GetRemoteBucketNameOk returns a tuple with the RemoteBucketName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReplicationCreationRequest) GetRemoteBucketNameOk() (*string, bool) {
if o == nil || o.RemoteBucketName == nil {
return nil, false
}
return o.RemoteBucketName, true
}
// HasRemoteBucketName returns a boolean if a field has been set.
func (o *ReplicationCreationRequest) HasRemoteBucketName() bool {
if o != nil && o.RemoteBucketName != nil {
return true
}
return false
}
// SetRemoteBucketName gets a reference to the given string and assigns it to the RemoteBucketName field.
func (o *ReplicationCreationRequest) SetRemoteBucketName(v string) {
o.RemoteBucketName = &v
}
// GetMaxQueueSizeBytes returns the MaxQueueSizeBytes field value
@ -308,9 +348,12 @@ func (o ReplicationCreationRequest) MarshalJSON() ([]byte, error) {
if true {
toSerialize["localBucketID"] = o.LocalBucketID
}
if true {
if o.RemoteBucketID != nil {
toSerialize["remoteBucketID"] = o.RemoteBucketID
}
if o.RemoteBucketName != nil {
toSerialize["remoteBucketName"] = o.RemoteBucketName
}
if true {
toSerialize["maxQueueSizeBytes"] = o.MaxQueueSizeBytes
}