Files
grafana/pkg/generated/applyconfiguration/provisioning/v0alpha1/syncstatus.go
T
Ryan McKinleyandRoberto Jiménez Sánchez 13b607875b POC/Provisioning/Syncer: keep progress while running a sync job (#100017)
* same replicate

* with feedback

* one pass

* so close... but delete error

* fix api

* keep hash

* incremental works

* cleanup

* cleanup

* UID cleanup

* err style

* split the two changes

* openapi

* fix timestamps

* sort deletes first

* changes

* make sure to keep folders

* cleanup

* cleanup

* tested complete

* incremental

* Update pkg/apis/provisioning/v0alpha1/jobs.go

Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>

* incremental

* complete

* lint fix

* use constant

* Update pkg/registry/apis/provisioning/jobs/syncer.go

Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>

* Update pkg/registry/apis/provisioning/jobs/syncer.go

* use currentRef

---------

Co-authored-by: Roberto Jiménez Sánchez <roberto.jimenez@grafana.com>
2025-02-07 09:23:07 +01:00

95 lines
4.4 KiB
Go

// SPDX-License-Identifier: AGPL-3.0-only
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v0alpha1
import (
provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1"
)
// SyncStatusApplyConfiguration represents a declarative configuration of the SyncStatus type for use
// with apply.
type SyncStatusApplyConfiguration struct {
State *provisioningv0alpha1.JobState `json:"state,omitempty"`
JobID *string `json:"job,omitempty"`
Started *int64 `json:"started,omitempty"`
Finished *int64 `json:"finished,omitempty"`
Scheduled *int64 `json:"scheduled,omitempty"`
Message []string `json:"message,omitempty"`
Hash *string `json:"hash,omitempty"`
Incremental *bool `json:"incremental,omitempty"`
}
// SyncStatusApplyConfiguration constructs a declarative configuration of the SyncStatus type for use with
// apply.
func SyncStatus() *SyncStatusApplyConfiguration {
return &SyncStatusApplyConfiguration{}
}
// WithState sets the State field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the State field is set to the value of the last call.
func (b *SyncStatusApplyConfiguration) WithState(value provisioningv0alpha1.JobState) *SyncStatusApplyConfiguration {
b.State = &value
return b
}
// WithJobID sets the JobID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the JobID field is set to the value of the last call.
func (b *SyncStatusApplyConfiguration) WithJobID(value string) *SyncStatusApplyConfiguration {
b.JobID = &value
return b
}
// WithStarted sets the Started field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Started field is set to the value of the last call.
func (b *SyncStatusApplyConfiguration) WithStarted(value int64) *SyncStatusApplyConfiguration {
b.Started = &value
return b
}
// WithFinished sets the Finished field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Finished field is set to the value of the last call.
func (b *SyncStatusApplyConfiguration) WithFinished(value int64) *SyncStatusApplyConfiguration {
b.Finished = &value
return b
}
// WithScheduled sets the Scheduled field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Scheduled field is set to the value of the last call.
func (b *SyncStatusApplyConfiguration) WithScheduled(value int64) *SyncStatusApplyConfiguration {
b.Scheduled = &value
return b
}
// WithMessage adds the given value to the Message field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Message field.
func (b *SyncStatusApplyConfiguration) WithMessage(values ...string) *SyncStatusApplyConfiguration {
for i := range values {
b.Message = append(b.Message, values[i])
}
return b
}
// WithHash sets the Hash field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Hash field is set to the value of the last call.
func (b *SyncStatusApplyConfiguration) WithHash(value string) *SyncStatusApplyConfiguration {
b.Hash = &value
return b
}
// WithIncremental sets the Incremental field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Incremental field is set to the value of the last call.
func (b *SyncStatusApplyConfiguration) WithIncremental(value bool) *SyncStatusApplyConfiguration {
b.Incremental = &value
return b
}