feat: add max age to replications create and update (#367)
This commit is contained in:
@ -44,6 +44,7 @@ type WriteApi interface {
|
||||
For more information and examples, see the following:
|
||||
- [Write data with the InfluxDB API]({{% INFLUXDB_DOCS_URL %}}/write-data/developer-tools/api).
|
||||
- [Optimize writes to InfluxDB]({{% INFLUXDB_DOCS_URL %}}/write-data/best-practices/optimize-writes/).
|
||||
- [Troubleshoot issues writing data]({{% INFLUXDB_DOCS_URL %}}/write-data/troubleshoot/)
|
||||
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return ApiPostWriteRequest
|
||||
@ -188,6 +189,7 @@ InfluxDB Cloud enforces rate and size limits different from InfluxDB OSS. For de
|
||||
For more information and examples, see the following:
|
||||
- [Write data with the InfluxDB API]({{% INFLUXDB_DOCS_URL %}}/write-data/developer-tools/api).
|
||||
- [Optimize writes to InfluxDB]({{% INFLUXDB_DOCS_URL %}}/write-data/best-practices/optimize-writes/).
|
||||
- [Troubleshoot issues writing data]({{% INFLUXDB_DOCS_URL %}}/write-data/troubleshoot/)
|
||||
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return ApiPostWriteRequest
|
||||
|
Submodule api/contract/openapi updated: 7500e3006b...6ea7df4daa
@ -24,13 +24,14 @@ type ReplicationCreationRequest struct {
|
||||
RemoteBucketID string `json:"remoteBucketID" yaml:"remoteBucketID"`
|
||||
MaxQueueSizeBytes int64 `json:"maxQueueSizeBytes" yaml:"maxQueueSizeBytes"`
|
||||
DropNonRetryableData *bool `json:"dropNonRetryableData,omitempty" yaml:"dropNonRetryableData,omitempty"`
|
||||
MaxAgeSeconds int64 `json:"maxAgeSeconds" yaml:"maxAgeSeconds"`
|
||||
}
|
||||
|
||||
// NewReplicationCreationRequest instantiates a new ReplicationCreationRequest object
|
||||
// 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) *ReplicationCreationRequest {
|
||||
func NewReplicationCreationRequest(name string, orgID string, remoteID string, localBucketID string, remoteBucketID string, maxQueueSizeBytes int64, maxAgeSeconds int64) *ReplicationCreationRequest {
|
||||
this := ReplicationCreationRequest{}
|
||||
this.Name = name
|
||||
this.OrgID = orgID
|
||||
@ -40,6 +41,7 @@ func NewReplicationCreationRequest(name string, orgID string, remoteID string, l
|
||||
this.MaxQueueSizeBytes = maxQueueSizeBytes
|
||||
var dropNonRetryableData bool = false
|
||||
this.DropNonRetryableData = &dropNonRetryableData
|
||||
this.MaxAgeSeconds = maxAgeSeconds
|
||||
return &this
|
||||
}
|
||||
|
||||
@ -52,6 +54,8 @@ func NewReplicationCreationRequestWithDefaults() *ReplicationCreationRequest {
|
||||
this.MaxQueueSizeBytes = maxQueueSizeBytes
|
||||
var dropNonRetryableData bool = false
|
||||
this.DropNonRetryableData = &dropNonRetryableData
|
||||
var maxAgeSeconds int64 = 604800
|
||||
this.MaxAgeSeconds = maxAgeSeconds
|
||||
return &this
|
||||
}
|
||||
|
||||
@ -263,6 +267,30 @@ func (o *ReplicationCreationRequest) SetDropNonRetryableData(v bool) {
|
||||
o.DropNonRetryableData = &v
|
||||
}
|
||||
|
||||
// GetMaxAgeSeconds returns the MaxAgeSeconds field value
|
||||
func (o *ReplicationCreationRequest) GetMaxAgeSeconds() int64 {
|
||||
if o == nil {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.MaxAgeSeconds
|
||||
}
|
||||
|
||||
// GetMaxAgeSecondsOk returns a tuple with the MaxAgeSeconds field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ReplicationCreationRequest) GetMaxAgeSecondsOk() (*int64, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.MaxAgeSeconds, true
|
||||
}
|
||||
|
||||
// SetMaxAgeSeconds sets field value
|
||||
func (o *ReplicationCreationRequest) SetMaxAgeSeconds(v int64) {
|
||||
o.MaxAgeSeconds = v
|
||||
}
|
||||
|
||||
func (o ReplicationCreationRequest) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
@ -289,6 +317,9 @@ func (o ReplicationCreationRequest) MarshalJSON() ([]byte, error) {
|
||||
if o.DropNonRetryableData != nil {
|
||||
toSerialize["dropNonRetryableData"] = o.DropNonRetryableData
|
||||
}
|
||||
if true {
|
||||
toSerialize["maxAgeSeconds"] = o.MaxAgeSeconds
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ type ReplicationUpdateRequest struct {
|
||||
RemoteBucketID *string `json:"remoteBucketID,omitempty" yaml:"remoteBucketID,omitempty"`
|
||||
MaxQueueSizeBytes *int64 `json:"maxQueueSizeBytes,omitempty" yaml:"maxQueueSizeBytes,omitempty"`
|
||||
DropNonRetryableData *bool `json:"dropNonRetryableData,omitempty" yaml:"dropNonRetryableData,omitempty"`
|
||||
MaxAgeSeconds *int64 `json:"maxAgeSeconds,omitempty" yaml:"maxAgeSeconds,omitempty"`
|
||||
}
|
||||
|
||||
// NewReplicationUpdateRequest instantiates a new ReplicationUpdateRequest object
|
||||
@ -233,6 +234,38 @@ func (o *ReplicationUpdateRequest) SetDropNonRetryableData(v bool) {
|
||||
o.DropNonRetryableData = &v
|
||||
}
|
||||
|
||||
// GetMaxAgeSeconds returns the MaxAgeSeconds field value if set, zero value otherwise.
|
||||
func (o *ReplicationUpdateRequest) GetMaxAgeSeconds() int64 {
|
||||
if o == nil || o.MaxAgeSeconds == nil {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.MaxAgeSeconds
|
||||
}
|
||||
|
||||
// GetMaxAgeSecondsOk returns a tuple with the MaxAgeSeconds field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ReplicationUpdateRequest) GetMaxAgeSecondsOk() (*int64, bool) {
|
||||
if o == nil || o.MaxAgeSeconds == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.MaxAgeSeconds, true
|
||||
}
|
||||
|
||||
// HasMaxAgeSeconds returns a boolean if a field has been set.
|
||||
func (o *ReplicationUpdateRequest) HasMaxAgeSeconds() bool {
|
||||
if o != nil && o.MaxAgeSeconds != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMaxAgeSeconds gets a reference to the given int64 and assigns it to the MaxAgeSeconds field.
|
||||
func (o *ReplicationUpdateRequest) SetMaxAgeSeconds(v int64) {
|
||||
o.MaxAgeSeconds = &v
|
||||
}
|
||||
|
||||
func (o ReplicationUpdateRequest) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Name != nil {
|
||||
@ -253,6 +286,9 @@ func (o ReplicationUpdateRequest) MarshalJSON() ([]byte, error) {
|
||||
if o.DropNonRetryableData != nil {
|
||||
toSerialize["dropNonRetryableData"] = o.DropNonRetryableData
|
||||
}
|
||||
if o.MaxAgeSeconds != nil {
|
||||
toSerialize["maxAgeSeconds"] = o.MaxAgeSeconds
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user