diff --git a/charts/argobot/Chart.yaml b/charts/argobot/Chart.yaml index be0cdd9..44b8fff 100644 --- a/charts/argobot/Chart.yaml +++ b/charts/argobot/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: argobot description: Helm chart for the corymurphy/argobot app type: application -version: 0.9.0 -appVersion: 0.9.0 +version: 0.10.0 +appVersion: 0.10.0 diff --git a/pkg/argocd/applications_client.go b/pkg/argocd/applications_client.go index 5cf4337..45e2c3b 100644 --- a/pkg/argocd/applications_client.go +++ b/pkg/argocd/applications_client.go @@ -12,7 +12,7 @@ import ( "github.com/argoproj/argo-cd/v2/pkg/apiclient/application" "github.com/argoproj/argo-cd/v2/pkg/apiclient/settings" argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" - models "github.com/corymurphy/argobot/pkg/argocd/models" + // argp // models "github.com/corymurphy/argobot/pkg/argocd/models" ) @@ -63,32 +63,32 @@ func (c *ApplicationsClient) Apply(app string, revision string) (string, error) return string(body), nil } -func (c *ApplicationsClient) List() (models.V1alpha1ApplicationList, error) { - var apps models.V1alpha1ApplicationList +func (c *ApplicationsClient) List() (*argoappv1.ApplicationList, error) { + var apps argoappv1.ApplicationList url := fmt.Sprintf("%s/api/v1/applications", c.BaseUrl) req, err := http.NewRequest("GET", url, nil) if err != nil { - return apps, err + return &apps, err } req.Header.Add("Content-Type", "application/json") req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", c.Token)) resp, err := http.DefaultClient.Do(req) if err != nil { - return apps, err + return &apps, err } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { - return apps, err + return &apps, err } if err := json.Unmarshal(body, &apps); err != nil { - return apps, err + return &apps, err } - return apps, nil + return &apps, nil } func (c *ApplicationsClient) Get(name string) (*argoappv1.Application, error) { diff --git a/pkg/argocd/diff.go b/pkg/argocd/diff.go index 9b1ebf7..192b845 100644 --- a/pkg/argocd/diff.go +++ b/pkg/argocd/diff.go @@ -19,7 +19,6 @@ import ( "github.com/argoproj/gitops-engine/pkg/sync/hook" "github.com/argoproj/gitops-engine/pkg/sync/ignore" "github.com/argoproj/gitops-engine/pkg/utils/kube" - models "github.com/corymurphy/argobot/pkg/argocd/models" "github.com/corymurphy/argobot/pkg/logging" "gopkg.in/yaml.v2" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -40,7 +39,7 @@ func Plan(ctx context.Context, argoSettings *settings.Settings, app *argoappv1.A var unstructureds []*unstructured.Unstructured for _, mfst := range target.Manifests { - obj, err := models.UnmarshalToUnstructured(mfst) + obj, err := UnmarshalToUnstructured(mfst) if err != nil { return plan, hasDiff, nil } diff --git a/pkg/argocd/models/extensions.go b/pkg/argocd/extensions.go similarity index 72% rename from pkg/argocd/models/extensions.go rename to pkg/argocd/extensions.go index 7715529..bb66616 100644 --- a/pkg/argocd/models/extensions.go +++ b/pkg/argocd/extensions.go @@ -1,4 +1,4 @@ -package models +package argocd import ( "encoding/json" @@ -6,10 +6,6 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) -func (r V1alpha1ResourceDiff) LiveObject() (*unstructured.Unstructured, error) { - return UnmarshalToUnstructured(r.LiveState) -} - func UnmarshalToUnstructured(resource string) (*unstructured.Unstructured, error) { if resource == "" || resource == "null" { return nil, nil diff --git a/pkg/argocd/models/account_account.go b/pkg/argocd/models/account_account.go deleted file mode 100644 index 3b498c9..0000000 --- a/pkg/argocd/models/account_account.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AccountAccount account account -// -// swagger:model accountAccount -type AccountAccount struct { - - // capabilities - Capabilities []string `json:"capabilities"` - - // enabled - Enabled bool `json:"enabled,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // tokens - Tokens []*AccountToken `json:"tokens"` -} - -// Validate validates this account account -func (m *AccountAccount) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokens(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AccountAccount) validateTokens(formats strfmt.Registry) error { - if swag.IsZero(m.Tokens) { // not required - return nil - } - - for i := 0; i < len(m.Tokens); i++ { - if swag.IsZero(m.Tokens[i]) { // not required - continue - } - - if m.Tokens[i] != nil { - if err := m.Tokens[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this account account based on the context it is used -func (m *AccountAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokens(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AccountAccount) contextValidateTokens(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tokens); i++ { - - if m.Tokens[i] != nil { - - if swag.IsZero(m.Tokens[i]) { // not required - return nil - } - - if err := m.Tokens[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AccountAccount) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccountAccount) UnmarshalBinary(b []byte) error { - var res AccountAccount - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/account_accounts_list.go b/pkg/argocd/models/account_accounts_list.go deleted file mode 100644 index fcc7549..0000000 --- a/pkg/argocd/models/account_accounts_list.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AccountAccountsList account accounts list -// -// swagger:model accountAccountsList -type AccountAccountsList struct { - - // items - Items []*AccountAccount `json:"items"` -} - -// Validate validates this account accounts list -func (m *AccountAccountsList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AccountAccountsList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this account accounts list based on the context it is used -func (m *AccountAccountsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *AccountAccountsList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *AccountAccountsList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccountAccountsList) UnmarshalBinary(b []byte) error { - var res AccountAccountsList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/account_can_i_response.go b/pkg/argocd/models/account_can_i_response.go deleted file mode 100644 index 3c919c3..0000000 --- a/pkg/argocd/models/account_can_i_response.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AccountCanIResponse account can i response -// -// swagger:model accountCanIResponse -type AccountCanIResponse struct { - - // value - Value string `json:"value,omitempty"` -} - -// Validate validates this account can i response -func (m *AccountCanIResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this account can i response based on context it is used -func (m *AccountCanIResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccountCanIResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccountCanIResponse) UnmarshalBinary(b []byte) error { - var res AccountCanIResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/account_create_token_request.go b/pkg/argocd/models/account_create_token_request.go deleted file mode 100644 index 76f2647..0000000 --- a/pkg/argocd/models/account_create_token_request.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AccountCreateTokenRequest account create token request -// -// swagger:model accountCreateTokenRequest -type AccountCreateTokenRequest struct { - - // expiresIn represents a duration in seconds - ExpiresIn int64 `json:"expiresIn,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // name - Name string `json:"name,omitempty"` -} - -// Validate validates this account create token request -func (m *AccountCreateTokenRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this account create token request based on context it is used -func (m *AccountCreateTokenRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccountCreateTokenRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccountCreateTokenRequest) UnmarshalBinary(b []byte) error { - var res AccountCreateTokenRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/account_create_token_response.go b/pkg/argocd/models/account_create_token_response.go deleted file mode 100644 index 8035fdb..0000000 --- a/pkg/argocd/models/account_create_token_response.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AccountCreateTokenResponse account create token response -// -// swagger:model accountCreateTokenResponse -type AccountCreateTokenResponse struct { - - // token - Token string `json:"token,omitempty"` -} - -// Validate validates this account create token response -func (m *AccountCreateTokenResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this account create token response based on context it is used -func (m *AccountCreateTokenResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccountCreateTokenResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccountCreateTokenResponse) UnmarshalBinary(b []byte) error { - var res AccountCreateTokenResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/account_empty_response.go b/pkg/argocd/models/account_empty_response.go deleted file mode 100644 index dd179d3..0000000 --- a/pkg/argocd/models/account_empty_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// AccountEmptyResponse account empty response -// -// swagger:model accountEmptyResponse -type AccountEmptyResponse interface{} diff --git a/pkg/argocd/models/account_token.go b/pkg/argocd/models/account_token.go deleted file mode 100644 index 4242d21..0000000 --- a/pkg/argocd/models/account_token.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AccountToken account token -// -// swagger:model accountToken -type AccountToken struct { - - // expires at - ExpiresAt int64 `json:"expiresAt,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // issued at - IssuedAt int64 `json:"issuedAt,omitempty"` -} - -// Validate validates this account token -func (m *AccountToken) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this account token based on context it is used -func (m *AccountToken) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccountToken) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccountToken) UnmarshalBinary(b []byte) error { - var res AccountToken - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/account_update_password_request.go b/pkg/argocd/models/account_update_password_request.go deleted file mode 100644 index 7509d96..0000000 --- a/pkg/argocd/models/account_update_password_request.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// AccountUpdatePasswordRequest account update password request -// -// swagger:model accountUpdatePasswordRequest -type AccountUpdatePasswordRequest struct { - - // current password - CurrentPassword string `json:"currentPassword,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // new password - NewPassword string `json:"newPassword,omitempty"` -} - -// Validate validates this account update password request -func (m *AccountUpdatePasswordRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this account update password request based on context it is used -func (m *AccountUpdatePasswordRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *AccountUpdatePasswordRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *AccountUpdatePasswordRequest) UnmarshalBinary(b []byte) error { - var res AccountUpdatePasswordRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/account_update_password_response.go b/pkg/argocd/models/account_update_password_response.go deleted file mode 100644 index 7e75c9b..0000000 --- a/pkg/argocd/models/account_update_password_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// AccountUpdatePasswordResponse account update password response -// -// swagger:model accountUpdatePasswordResponse -type AccountUpdatePasswordResponse interface{} diff --git a/pkg/argocd/models/application_application_manifest_query_with_files.go b/pkg/argocd/models/application_application_manifest_query_with_files.go deleted file mode 100644 index ec1a447..0000000 --- a/pkg/argocd/models/application_application_manifest_query_with_files.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationManifestQueryWithFiles application application manifest query with files -// -// swagger:model applicationApplicationManifestQueryWithFiles -type ApplicationApplicationManifestQueryWithFiles struct { - - // app namespace - AppNamespace string `json:"appNamespace,omitempty"` - - // checksum - Checksum string `json:"checksum,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // project - Project string `json:"project,omitempty"` -} - -// Validate validates this application application manifest query with files -func (m *ApplicationApplicationManifestQueryWithFiles) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application application manifest query with files based on context it is used -func (m *ApplicationApplicationManifestQueryWithFiles) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationManifestQueryWithFiles) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationManifestQueryWithFiles) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationManifestQueryWithFiles - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_application_manifest_query_with_files_wrapper.go b/pkg/argocd/models/application_application_manifest_query_with_files_wrapper.go deleted file mode 100644 index 878fc98..0000000 --- a/pkg/argocd/models/application_application_manifest_query_with_files_wrapper.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationManifestQueryWithFilesWrapper application application manifest query with files wrapper -// -// swagger:model applicationApplicationManifestQueryWithFilesWrapper -type ApplicationApplicationManifestQueryWithFilesWrapper struct { - - // chunk - Chunk *ApplicationFileChunk `json:"chunk,omitempty"` - - // query - Query *ApplicationApplicationManifestQueryWithFiles `json:"query,omitempty"` -} - -// Validate validates this application application manifest query with files wrapper -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateChunk(formats); err != nil { - res = append(res, err) - } - - if err := m.validateQuery(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) validateChunk(formats strfmt.Registry) error { - if swag.IsZero(m.Chunk) { // not required - return nil - } - - if m.Chunk != nil { - if err := m.Chunk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chunk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chunk") - } - return err - } - } - - return nil -} - -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) validateQuery(formats strfmt.Registry) error { - if swag.IsZero(m.Query) { // not required - return nil - } - - if m.Query != nil { - if err := m.Query.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("query") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("query") - } - return err - } - } - - return nil -} - -// ContextValidate validate this application application manifest query with files wrapper based on the context it is used -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateChunk(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateQuery(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) contextValidateChunk(ctx context.Context, formats strfmt.Registry) error { - - if m.Chunk != nil { - - if swag.IsZero(m.Chunk) { // not required - return nil - } - - if err := m.Chunk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("chunk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("chunk") - } - return err - } - } - - return nil -} - -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) contextValidateQuery(ctx context.Context, formats strfmt.Registry) error { - - if m.Query != nil { - - if swag.IsZero(m.Query) { // not required - return nil - } - - if err := m.Query.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("query") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("query") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationManifestQueryWithFilesWrapper) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationManifestQueryWithFilesWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_application_patch_request.go b/pkg/argocd/models/application_application_patch_request.go deleted file mode 100644 index ab5fe47..0000000 --- a/pkg/argocd/models/application_application_patch_request.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationPatchRequest ApplicationPatchRequest is a request to patch an application -// -// swagger:model applicationApplicationPatchRequest -type ApplicationApplicationPatchRequest struct { - - // app namespace - AppNamespace string `json:"appNamespace,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // patch - Patch string `json:"patch,omitempty"` - - // patch type - PatchType string `json:"patchType,omitempty"` - - // project - Project string `json:"project,omitempty"` -} - -// Validate validates this application application patch request -func (m *ApplicationApplicationPatchRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application application patch request based on context it is used -func (m *ApplicationApplicationPatchRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationPatchRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationPatchRequest) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationPatchRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_application_resource_response.go b/pkg/argocd/models/application_application_resource_response.go deleted file mode 100644 index 65e7d6e..0000000 --- a/pkg/argocd/models/application_application_resource_response.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationResourceResponse application application resource response -// -// swagger:model applicationApplicationResourceResponse -type ApplicationApplicationResourceResponse struct { - - // manifest - Manifest string `json:"manifest,omitempty"` -} - -// Validate validates this application application resource response -func (m *ApplicationApplicationResourceResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application application resource response based on context it is used -func (m *ApplicationApplicationResourceResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationResourceResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationResourceResponse) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationResourceResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_application_response.go b/pkg/argocd/models/application_application_response.go deleted file mode 100644 index 9719291..0000000 --- a/pkg/argocd/models/application_application_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// ApplicationApplicationResponse application application response -// -// swagger:model applicationApplicationResponse -type ApplicationApplicationResponse interface{} diff --git a/pkg/argocd/models/application_application_rollback_request.go b/pkg/argocd/models/application_application_rollback_request.go deleted file mode 100644 index ece64de..0000000 --- a/pkg/argocd/models/application_application_rollback_request.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationRollbackRequest application application rollback request -// -// swagger:model applicationApplicationRollbackRequest -type ApplicationApplicationRollbackRequest struct { - - // app namespace - AppNamespace string `json:"appNamespace,omitempty"` - - // dry run - DryRun bool `json:"dryRun,omitempty"` - - // id - ID int64 `json:"id,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // project - Project string `json:"project,omitempty"` - - // prune - Prune bool `json:"prune,omitempty"` -} - -// Validate validates this application application rollback request -func (m *ApplicationApplicationRollbackRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application application rollback request based on context it is used -func (m *ApplicationApplicationRollbackRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationRollbackRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationRollbackRequest) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationRollbackRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_application_sync_request.go b/pkg/argocd/models/application_application_sync_request.go deleted file mode 100644 index 149c81a..0000000 --- a/pkg/argocd/models/application_application_sync_request.go +++ /dev/null @@ -1,363 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationSyncRequest ApplicationSyncRequest is a request to apply the config state to live state -// -// swagger:model applicationApplicationSyncRequest -type ApplicationApplicationSyncRequest struct { - - // app namespace - AppNamespace string `json:"appNamespace,omitempty"` - - // dry run - DryRun bool `json:"dryRun,omitempty"` - - // infos - Infos []*V1alpha1Info `json:"infos"` - - // manifests - Manifests []string `json:"manifests"` - - // name - Name string `json:"name,omitempty"` - - // project - Project string `json:"project,omitempty"` - - // prune - Prune bool `json:"prune,omitempty"` - - // resources - Resources []*V1alpha1SyncOperationResource `json:"resources"` - - // retry strategy - RetryStrategy *V1alpha1RetryStrategy `json:"retryStrategy,omitempty"` - - // revision - Revision string `json:"revision,omitempty"` - - // revisions - Revisions []string `json:"revisions"` - - // source positions - SourcePositions []string `json:"sourcePositions"` - - // strategy - Strategy *V1alpha1SyncStrategy `json:"strategy,omitempty"` - - // sync options - SyncOptions *ApplicationSyncOptions `json:"syncOptions,omitempty"` -} - -// Validate validates this application application sync request -func (m *ApplicationApplicationSyncRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfos(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetryStrategy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStrategy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyncOptions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationApplicationSyncRequest) validateInfos(formats strfmt.Registry) error { - if swag.IsZero(m.Infos) { // not required - return nil - } - - for i := 0; i < len(m.Infos); i++ { - if swag.IsZero(m.Infos[i]) { // not required - continue - } - - if m.Infos[i] != nil { - if err := m.Infos[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infos" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infos" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) validateResources(formats strfmt.Registry) error { - if swag.IsZero(m.Resources) { // not required - return nil - } - - for i := 0; i < len(m.Resources); i++ { - if swag.IsZero(m.Resources[i]) { // not required - continue - } - - if m.Resources[i] != nil { - if err := m.Resources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) validateRetryStrategy(formats strfmt.Registry) error { - if swag.IsZero(m.RetryStrategy) { // not required - return nil - } - - if m.RetryStrategy != nil { - if err := m.RetryStrategy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retryStrategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retryStrategy") - } - return err - } - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) validateStrategy(formats strfmt.Registry) error { - if swag.IsZero(m.Strategy) { // not required - return nil - } - - if m.Strategy != nil { - if err := m.Strategy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("strategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("strategy") - } - return err - } - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) validateSyncOptions(formats strfmt.Registry) error { - if swag.IsZero(m.SyncOptions) { // not required - return nil - } - - if m.SyncOptions != nil { - if err := m.SyncOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncOptions") - } - return err - } - } - - return nil -} - -// ContextValidate validate this application application sync request based on the context it is used -func (m *ApplicationApplicationSyncRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfos(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetryStrategy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStrategy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyncOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationApplicationSyncRequest) contextValidateInfos(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Infos); i++ { - - if m.Infos[i] != nil { - - if swag.IsZero(m.Infos[i]) { // not required - return nil - } - - if err := m.Infos[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("infos" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("infos" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Resources); i++ { - - if m.Resources[i] != nil { - - if swag.IsZero(m.Resources[i]) { // not required - return nil - } - - if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) contextValidateRetryStrategy(ctx context.Context, formats strfmt.Registry) error { - - if m.RetryStrategy != nil { - - if swag.IsZero(m.RetryStrategy) { // not required - return nil - } - - if err := m.RetryStrategy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retryStrategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retryStrategy") - } - return err - } - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) contextValidateStrategy(ctx context.Context, formats strfmt.Registry) error { - - if m.Strategy != nil { - - if swag.IsZero(m.Strategy) { // not required - return nil - } - - if err := m.Strategy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("strategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("strategy") - } - return err - } - } - - return nil -} - -func (m *ApplicationApplicationSyncRequest) contextValidateSyncOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.SyncOptions != nil { - - if swag.IsZero(m.SyncOptions) { // not required - return nil - } - - if err := m.SyncOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncOptions") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationSyncRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationSyncRequest) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationSyncRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_application_sync_window.go b/pkg/argocd/models/application_application_sync_window.go deleted file mode 100644 index bb7e1fe..0000000 --- a/pkg/argocd/models/application_application_sync_window.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationSyncWindow application application sync window -// -// swagger:model applicationApplicationSyncWindow -type ApplicationApplicationSyncWindow struct { - - // duration - Duration string `json:"duration,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` - - // manual sync - ManualSync bool `json:"manualSync,omitempty"` - - // schedule - Schedule string `json:"schedule,omitempty"` -} - -// Validate validates this application application sync window -func (m *ApplicationApplicationSyncWindow) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application application sync window based on context it is used -func (m *ApplicationApplicationSyncWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationSyncWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationSyncWindow) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationSyncWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_application_sync_windows_response.go b/pkg/argocd/models/application_application_sync_windows_response.go deleted file mode 100644 index da4b5c0..0000000 --- a/pkg/argocd/models/application_application_sync_windows_response.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationApplicationSyncWindowsResponse application application sync windows response -// -// swagger:model applicationApplicationSyncWindowsResponse -type ApplicationApplicationSyncWindowsResponse struct { - - // active windows - ActiveWindows []*ApplicationApplicationSyncWindow `json:"activeWindows"` - - // assigned windows - AssignedWindows []*ApplicationApplicationSyncWindow `json:"assignedWindows"` - - // can sync - CanSync bool `json:"canSync,omitempty"` -} - -// Validate validates this application application sync windows response -func (m *ApplicationApplicationSyncWindowsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActiveWindows(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAssignedWindows(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationApplicationSyncWindowsResponse) validateActiveWindows(formats strfmt.Registry) error { - if swag.IsZero(m.ActiveWindows) { // not required - return nil - } - - for i := 0; i < len(m.ActiveWindows); i++ { - if swag.IsZero(m.ActiveWindows[i]) { // not required - continue - } - - if m.ActiveWindows[i] != nil { - if err := m.ActiveWindows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationApplicationSyncWindowsResponse) validateAssignedWindows(formats strfmt.Registry) error { - if swag.IsZero(m.AssignedWindows) { // not required - return nil - } - - for i := 0; i < len(m.AssignedWindows); i++ { - if swag.IsZero(m.AssignedWindows[i]) { // not required - continue - } - - if m.AssignedWindows[i] != nil { - if err := m.AssignedWindows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("assignedWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("assignedWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this application application sync windows response based on the context it is used -func (m *ApplicationApplicationSyncWindowsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActiveWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAssignedWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationApplicationSyncWindowsResponse) contextValidateActiveWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ActiveWindows); i++ { - - if m.ActiveWindows[i] != nil { - - if swag.IsZero(m.ActiveWindows[i]) { // not required - return nil - } - - if err := m.ActiveWindows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("activeWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("activeWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ApplicationApplicationSyncWindowsResponse) contextValidateAssignedWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.AssignedWindows); i++ { - - if m.AssignedWindows[i] != nil { - - if swag.IsZero(m.AssignedWindows[i]) { // not required - return nil - } - - if err := m.AssignedWindows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("assignedWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("assignedWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationApplicationSyncWindowsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationApplicationSyncWindowsResponse) UnmarshalBinary(b []byte) error { - var res ApplicationApplicationSyncWindowsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_file_chunk.go b/pkg/argocd/models/application_file_chunk.go deleted file mode 100644 index daf9594..0000000 --- a/pkg/argocd/models/application_file_chunk.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationFileChunk application file chunk -// -// swagger:model applicationFileChunk -type ApplicationFileChunk struct { - - // chunk - // Format: byte - Chunk strfmt.Base64 `json:"chunk,omitempty"` -} - -// Validate validates this application file chunk -func (m *ApplicationFileChunk) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application file chunk based on context it is used -func (m *ApplicationFileChunk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationFileChunk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationFileChunk) UnmarshalBinary(b []byte) error { - var res ApplicationFileChunk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_link_info.go b/pkg/argocd/models/application_link_info.go deleted file mode 100644 index 2d59412..0000000 --- a/pkg/argocd/models/application_link_info.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationLinkInfo application link info -// -// swagger:model applicationLinkInfo -type ApplicationLinkInfo struct { - - // description - Description string `json:"description,omitempty"` - - // icon class - IconClass string `json:"iconClass,omitempty"` - - // title - Title string `json:"title,omitempty"` - - // url - URL string `json:"url,omitempty"` -} - -// Validate validates this application link info -func (m *ApplicationLinkInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application link info based on context it is used -func (m *ApplicationLinkInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationLinkInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationLinkInfo) UnmarshalBinary(b []byte) error { - var res ApplicationLinkInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_links_response.go b/pkg/argocd/models/application_links_response.go deleted file mode 100644 index 9a834e1..0000000 --- a/pkg/argocd/models/application_links_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationLinksResponse application links response -// -// swagger:model applicationLinksResponse -type ApplicationLinksResponse struct { - - // items - Items []*ApplicationLinkInfo `json:"items"` -} - -// Validate validates this application links response -func (m *ApplicationLinksResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationLinksResponse) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this application links response based on the context it is used -func (m *ApplicationLinksResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationLinksResponse) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationLinksResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationLinksResponse) UnmarshalBinary(b []byte) error { - var res ApplicationLinksResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_log_entry.go b/pkg/argocd/models/application_log_entry.go deleted file mode 100644 index 0d4598d..0000000 --- a/pkg/argocd/models/application_log_entry.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationLogEntry application log entry -// -// swagger:model applicationLogEntry -type ApplicationLogEntry struct { - - // content - Content string `json:"content,omitempty"` - - // last - Last bool `json:"last,omitempty"` - - // pod name - PodName string `json:"podName,omitempty"` - - // time stamp - // Format: date-time - TimeStamp V1Time `json:"timeStamp,omitempty"` - - // time stamp str - TimeStampStr string `json:"timeStampStr,omitempty"` -} - -// Validate validates this application log entry -func (m *ApplicationLogEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTimeStamp(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationLogEntry) validateTimeStamp(formats strfmt.Registry) error { - if swag.IsZero(m.TimeStamp) { // not required - return nil - } - - if err := m.TimeStamp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeStamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeStamp") - } - return err - } - - return nil -} - -// ContextValidate validate this application log entry based on the context it is used -func (m *ApplicationLogEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTimeStamp(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationLogEntry) contextValidateTimeStamp(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.TimeStamp) { // not required - return nil - } - - if err := m.TimeStamp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("timeStamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("timeStamp") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationLogEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationLogEntry) UnmarshalBinary(b []byte) error { - var res ApplicationLogEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_managed_resources_response.go b/pkg/argocd/models/application_managed_resources_response.go deleted file mode 100644 index ad47146..0000000 --- a/pkg/argocd/models/application_managed_resources_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationManagedResourcesResponse application managed resources response -// -// swagger:model applicationManagedResourcesResponse -type ApplicationManagedResourcesResponse struct { - - // items - Items []*V1alpha1ResourceDiff `json:"items"` -} - -// Validate validates this application managed resources response -func (m *ApplicationManagedResourcesResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationManagedResourcesResponse) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this application managed resources response based on the context it is used -func (m *ApplicationManagedResourcesResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationManagedResourcesResponse) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationManagedResourcesResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationManagedResourcesResponse) UnmarshalBinary(b []byte) error { - var res ApplicationManagedResourcesResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_operation_terminate_response.go b/pkg/argocd/models/application_operation_terminate_response.go deleted file mode 100644 index ebb9006..0000000 --- a/pkg/argocd/models/application_operation_terminate_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// ApplicationOperationTerminateResponse application operation terminate response -// -// swagger:model applicationOperationTerminateResponse -type ApplicationOperationTerminateResponse interface{} diff --git a/pkg/argocd/models/application_resource_actions_list_response.go b/pkg/argocd/models/application_resource_actions_list_response.go deleted file mode 100644 index 91bc2ad..0000000 --- a/pkg/argocd/models/application_resource_actions_list_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationResourceActionsListResponse application resource actions list response -// -// swagger:model applicationResourceActionsListResponse -type ApplicationResourceActionsListResponse struct { - - // actions - Actions []*V1alpha1ResourceAction `json:"actions"` -} - -// Validate validates this application resource actions list response -func (m *ApplicationResourceActionsListResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateActions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationResourceActionsListResponse) validateActions(formats strfmt.Registry) error { - if swag.IsZero(m.Actions) { // not required - return nil - } - - for i := 0; i < len(m.Actions); i++ { - if swag.IsZero(m.Actions[i]) { // not required - continue - } - - if m.Actions[i] != nil { - if err := m.Actions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("actions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("actions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this application resource actions list response based on the context it is used -func (m *ApplicationResourceActionsListResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateActions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationResourceActionsListResponse) contextValidateActions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Actions); i++ { - - if m.Actions[i] != nil { - - if swag.IsZero(m.Actions[i]) { // not required - return nil - } - - if err := m.Actions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("actions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("actions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationResourceActionsListResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationResourceActionsListResponse) UnmarshalBinary(b []byte) error { - var res ApplicationResourceActionsListResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/application_sync_options.go b/pkg/argocd/models/application_sync_options.go deleted file mode 100644 index 1d66a71..0000000 --- a/pkg/argocd/models/application_sync_options.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationSyncOptions application sync options -// -// swagger:model applicationSyncOptions -type ApplicationSyncOptions struct { - - // items - Items []string `json:"items"` -} - -// Validate validates this application sync options -func (m *ApplicationSyncOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this application sync options based on context it is used -func (m *ApplicationSyncOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationSyncOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationSyncOptions) UnmarshalBinary(b []byte) error { - var res ApplicationSyncOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/applicationset_application_set_response.go b/pkg/argocd/models/applicationset_application_set_response.go deleted file mode 100644 index 19b684d..0000000 --- a/pkg/argocd/models/applicationset_application_set_response.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ApplicationsetApplicationSetResponse applicationset application set response -// -// swagger:model applicationsetApplicationSetResponse -type ApplicationsetApplicationSetResponse struct { - - // applicationset - Applicationset *V1alpha1ApplicationSet `json:"applicationset,omitempty"` - - // project - Project string `json:"project,omitempty"` -} - -// Validate validates this applicationset application set response -func (m *ApplicationsetApplicationSetResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationset(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationsetApplicationSetResponse) validateApplicationset(formats strfmt.Registry) error { - if swag.IsZero(m.Applicationset) { // not required - return nil - } - - if m.Applicationset != nil { - if err := m.Applicationset.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationset") - } - return err - } - } - - return nil -} - -// ContextValidate validate this applicationset application set response based on the context it is used -func (m *ApplicationsetApplicationSetResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationset(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ApplicationsetApplicationSetResponse) contextValidateApplicationset(ctx context.Context, formats strfmt.Registry) error { - - if m.Applicationset != nil { - - if swag.IsZero(m.Applicationset) { // not required - return nil - } - - if err := m.Applicationset.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationset") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationset") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ApplicationsetApplicationSetResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ApplicationsetApplicationSetResponse) UnmarshalBinary(b []byte) error { - var res ApplicationsetApplicationSetResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/applicationv1alpha1_env_entry.go b/pkg/argocd/models/applicationv1alpha1_env_entry.go deleted file mode 100644 index 2941435..0000000 --- a/pkg/argocd/models/applicationv1alpha1_env_entry.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// Applicationv1alpha1EnvEntry EnvEntry represents an entry in the application's environment -// -// swagger:model applicationv1alpha1EnvEntry -type Applicationv1alpha1EnvEntry struct { - - // Name is the name of the variable, usually expressed in uppercase - Name string `json:"name,omitempty"` - - // Value is the value of the variable - Value string `json:"value,omitempty"` -} - -// Validate validates this applicationv1alpha1 env entry -func (m *Applicationv1alpha1EnvEntry) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this applicationv1alpha1 env entry based on context it is used -func (m *Applicationv1alpha1EnvEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Applicationv1alpha1EnvEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Applicationv1alpha1EnvEntry) UnmarshalBinary(b []byte) error { - var res Applicationv1alpha1EnvEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_cluster_id.go b/pkg/argocd/models/cluster_cluster_id.go deleted file mode 100644 index 54bc696..0000000 --- a/pkg/argocd/models/cluster_cluster_id.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterClusterID ClusterID holds a cluster server URL or cluster name -// -// swagger:model clusterClusterID -type ClusterClusterID struct { - - // type is the type of the specified cluster identifier ( "server" - default, "name" ) - Type string `json:"type,omitempty"` - - // value holds the cluster server URL or cluster name - Value string `json:"value,omitempty"` -} - -// Validate validates this cluster cluster ID -func (m *ClusterClusterID) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster cluster ID based on context it is used -func (m *ClusterClusterID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterClusterID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterClusterID) UnmarshalBinary(b []byte) error { - var res ClusterClusterID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_cluster_response.go b/pkg/argocd/models/cluster_cluster_response.go deleted file mode 100644 index 7f5d20f..0000000 --- a/pkg/argocd/models/cluster_cluster_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// ClusterClusterResponse cluster cluster response -// -// swagger:model clusterClusterResponse -type ClusterClusterResponse interface{} diff --git a/pkg/argocd/models/cluster_connector.go b/pkg/argocd/models/cluster_connector.go deleted file mode 100644 index 29d3521..0000000 --- a/pkg/argocd/models/cluster_connector.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterConnector cluster connector -// -// swagger:model clusterConnector -type ClusterConnector struct { - - // name - Name string `json:"name,omitempty"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this cluster connector -func (m *ClusterConnector) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster connector based on context it is used -func (m *ClusterConnector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterConnector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterConnector) UnmarshalBinary(b []byte) error { - var res ClusterConnector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_dex_config.go b/pkg/argocd/models/cluster_dex_config.go deleted file mode 100644 index 63028f6..0000000 --- a/pkg/argocd/models/cluster_dex_config.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterDexConfig cluster dex config -// -// swagger:model clusterDexConfig -type ClusterDexConfig struct { - - // connectors - Connectors []*ClusterConnector `json:"connectors"` -} - -// Validate validates this cluster dex config -func (m *ClusterDexConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectors(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterDexConfig) validateConnectors(formats strfmt.Registry) error { - if swag.IsZero(m.Connectors) { // not required - return nil - } - - for i := 0; i < len(m.Connectors); i++ { - if swag.IsZero(m.Connectors[i]) { // not required - continue - } - - if m.Connectors[i] != nil { - if err := m.Connectors[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster dex config based on the context it is used -func (m *ClusterDexConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectors(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterDexConfig) contextValidateConnectors(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Connectors); i++ { - - if m.Connectors[i] != nil { - - if swag.IsZero(m.Connectors[i]) { // not required - return nil - } - - if err := m.Connectors[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectors" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectors" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterDexConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterDexConfig) UnmarshalBinary(b []byte) error { - var res ClusterDexConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_google_analytics_config.go b/pkg/argocd/models/cluster_google_analytics_config.go deleted file mode 100644 index 0355f6a..0000000 --- a/pkg/argocd/models/cluster_google_analytics_config.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterGoogleAnalyticsConfig cluster google analytics config -// -// swagger:model clusterGoogleAnalyticsConfig -type ClusterGoogleAnalyticsConfig struct { - - // anonymize users - AnonymizeUsers bool `json:"anonymizeUsers,omitempty"` - - // tracking ID - TrackingID string `json:"trackingID,omitempty"` -} - -// Validate validates this cluster google analytics config -func (m *ClusterGoogleAnalyticsConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster google analytics config based on context it is used -func (m *ClusterGoogleAnalyticsConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterGoogleAnalyticsConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterGoogleAnalyticsConfig) UnmarshalBinary(b []byte) error { - var res ClusterGoogleAnalyticsConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_help.go b/pkg/argocd/models/cluster_help.go deleted file mode 100644 index a7d784b..0000000 --- a/pkg/argocd/models/cluster_help.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterHelp Help settings -// -// swagger:model clusterHelp -type ClusterHelp struct { - - // the URLs for downloading argocd binaries - BinaryUrls map[string]string `json:"binaryUrls,omitempty"` - - // the text for getting chat help, defaults to "Chat now!" - ChatText string `json:"chatText,omitempty"` - - // the URL for getting chat help, this will typically be your Slack channel for support - ChatURL string `json:"chatUrl,omitempty"` -} - -// Validate validates this cluster help -func (m *ClusterHelp) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster help based on context it is used -func (m *ClusterHelp) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterHelp) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterHelp) UnmarshalBinary(b []byte) error { - var res ClusterHelp - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_o_id_c_config.go b/pkg/argocd/models/cluster_o_id_c_config.go deleted file mode 100644 index 3b0d6ae..0000000 --- a/pkg/argocd/models/cluster_o_id_c_config.go +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterOIDCConfig cluster o ID c config -// -// swagger:model clusterOIDCConfig -type ClusterOIDCConfig struct { - - // cli client ID - CliClientID string `json:"cliClientID,omitempty"` - - // client ID - ClientID string `json:"clientID,omitempty"` - - // enable p k c e authentication - EnablePKCEAuthentication bool `json:"enablePKCEAuthentication,omitempty"` - - // id token claims - IDTokenClaims map[string]OidcClaim `json:"idTokenClaims,omitempty"` - - // issuer - Issuer string `json:"issuer,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // scopes - Scopes []string `json:"scopes"` -} - -// Validate validates this cluster o ID c config -func (m *ClusterOIDCConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIDTokenClaims(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterOIDCConfig) validateIDTokenClaims(formats strfmt.Registry) error { - if swag.IsZero(m.IDTokenClaims) { // not required - return nil - } - - for k := range m.IDTokenClaims { - - if err := validate.Required("idTokenClaims"+"."+k, "body", m.IDTokenClaims[k]); err != nil { - return err - } - if val, ok := m.IDTokenClaims[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("idTokenClaims" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("idTokenClaims" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster o ID c config based on the context it is used -func (m *ClusterOIDCConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIDTokenClaims(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterOIDCConfig) contextValidateIDTokenClaims(ctx context.Context, formats strfmt.Registry) error { - - for k := range m.IDTokenClaims { - - if val, ok := m.IDTokenClaims[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterOIDCConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterOIDCConfig) UnmarshalBinary(b []byte) error { - var res ClusterOIDCConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_plugin.go b/pkg/argocd/models/cluster_plugin.go deleted file mode 100644 index 6028b6b..0000000 --- a/pkg/argocd/models/cluster_plugin.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterPlugin Plugin settings -// -// swagger:model clusterPlugin -type ClusterPlugin struct { - - // the name of the plugin, e.g. "kasane" - Name string `json:"name,omitempty"` -} - -// Validate validates this cluster plugin -func (m *ClusterPlugin) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this cluster plugin based on context it is used -func (m *ClusterPlugin) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterPlugin) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterPlugin) UnmarshalBinary(b []byte) error { - var res ClusterPlugin - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_settings.go b/pkg/argocd/models/cluster_settings.go deleted file mode 100644 index 6103cc7..0000000 --- a/pkg/argocd/models/cluster_settings.go +++ /dev/null @@ -1,539 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ClusterSettings cluster settings -// -// swagger:model clusterSettings -type ClusterSettings struct { - - // app label key - AppLabelKey string `json:"appLabelKey,omitempty"` - - // apps in any namespace enabled - AppsInAnyNamespaceEnabled bool `json:"appsInAnyNamespaceEnabled,omitempty"` - - // Deprecated: use sidecar plugins instead. - ConfigManagementPlugins []*V1alpha1ConfigManagementPlugin `json:"configManagementPlugins"` - - // controller namespace - ControllerNamespace string `json:"controllerNamespace,omitempty"` - - // dex config - DexConfig *ClusterDexConfig `json:"dexConfig,omitempty"` - - // exec enabled - ExecEnabled bool `json:"execEnabled,omitempty"` - - // google analytics - GoogleAnalytics *ClusterGoogleAnalyticsConfig `json:"googleAnalytics,omitempty"` - - // help - Help *ClusterHelp `json:"help,omitempty"` - - // kustomize options - KustomizeOptions *V1alpha1KustomizeOptions `json:"kustomizeOptions,omitempty"` - - // kustomize versions - KustomizeVersions []string `json:"kustomizeVersions"` - - // oidc config - OidcConfig *ClusterOIDCConfig `json:"oidcConfig,omitempty"` - - // password pattern - PasswordPattern string `json:"passwordPattern,omitempty"` - - // plugins - Plugins []*ClusterPlugin `json:"plugins"` - - // resource overrides - ResourceOverrides map[string]V1alpha1ResourceOverride `json:"resourceOverrides,omitempty"` - - // status badge enabled - StatusBadgeEnabled bool `json:"statusBadgeEnabled,omitempty"` - - // status badge root Url - StatusBadgeRootURL string `json:"statusBadgeRootUrl,omitempty"` - - // tracking method - TrackingMethod string `json:"trackingMethod,omitempty"` - - // ui banner content - UIBannerContent string `json:"uiBannerContent,omitempty"` - - // ui banner permanent - UIBannerPermanent bool `json:"uiBannerPermanent,omitempty"` - - // ui banner position - UIBannerPosition string `json:"uiBannerPosition,omitempty"` - - // ui banner URL - UIBannerURL string `json:"uiBannerURL,omitempty"` - - // ui Css URL - UICSSURL string `json:"uiCssURL,omitempty"` - - // url - URL string `json:"url,omitempty"` - - // user logins disabled - UserLoginsDisabled bool `json:"userLoginsDisabled,omitempty"` -} - -// Validate validates this cluster settings -func (m *ClusterSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfigManagementPlugins(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDexConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGoogleAnalytics(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHelp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKustomizeOptions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOidcConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePlugins(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResourceOverrides(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterSettings) validateConfigManagementPlugins(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigManagementPlugins) { // not required - return nil - } - - for i := 0; i < len(m.ConfigManagementPlugins); i++ { - if swag.IsZero(m.ConfigManagementPlugins[i]) { // not required - continue - } - - if m.ConfigManagementPlugins[i] != nil { - if err := m.ConfigManagementPlugins[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configManagementPlugins" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configManagementPlugins" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterSettings) validateDexConfig(formats strfmt.Registry) error { - if swag.IsZero(m.DexConfig) { // not required - return nil - } - - if m.DexConfig != nil { - if err := m.DexConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dexConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dexConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) validateGoogleAnalytics(formats strfmt.Registry) error { - if swag.IsZero(m.GoogleAnalytics) { // not required - return nil - } - - if m.GoogleAnalytics != nil { - if err := m.GoogleAnalytics.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleAnalytics") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleAnalytics") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) validateHelp(formats strfmt.Registry) error { - if swag.IsZero(m.Help) { // not required - return nil - } - - if m.Help != nil { - if err := m.Help.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("help") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("help") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) validateKustomizeOptions(formats strfmt.Registry) error { - if swag.IsZero(m.KustomizeOptions) { // not required - return nil - } - - if m.KustomizeOptions != nil { - if err := m.KustomizeOptions.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kustomizeOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kustomizeOptions") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) validateOidcConfig(formats strfmt.Registry) error { - if swag.IsZero(m.OidcConfig) { // not required - return nil - } - - if m.OidcConfig != nil { - if err := m.OidcConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oidcConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oidcConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) validatePlugins(formats strfmt.Registry) error { - if swag.IsZero(m.Plugins) { // not required - return nil - } - - for i := 0; i < len(m.Plugins); i++ { - if swag.IsZero(m.Plugins[i]) { // not required - continue - } - - if m.Plugins[i] != nil { - if err := m.Plugins[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugins" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugins" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterSettings) validateResourceOverrides(formats strfmt.Registry) error { - if swag.IsZero(m.ResourceOverrides) { // not required - return nil - } - - for k := range m.ResourceOverrides { - - if err := validate.Required("resourceOverrides"+"."+k, "body", m.ResourceOverrides[k]); err != nil { - return err - } - if val, ok := m.ResourceOverrides[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourceOverrides" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourceOverrides" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster settings based on the context it is used -func (m *ClusterSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfigManagementPlugins(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDexConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGoogleAnalytics(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHelp(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKustomizeOptions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOidcConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePlugins(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResourceOverrides(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterSettings) contextValidateConfigManagementPlugins(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ConfigManagementPlugins); i++ { - - if m.ConfigManagementPlugins[i] != nil { - - if swag.IsZero(m.ConfigManagementPlugins[i]) { // not required - return nil - } - - if err := m.ConfigManagementPlugins[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configManagementPlugins" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configManagementPlugins" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterSettings) contextValidateDexConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.DexConfig != nil { - - if swag.IsZero(m.DexConfig) { // not required - return nil - } - - if err := m.DexConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("dexConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("dexConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) contextValidateGoogleAnalytics(ctx context.Context, formats strfmt.Registry) error { - - if m.GoogleAnalytics != nil { - - if swag.IsZero(m.GoogleAnalytics) { // not required - return nil - } - - if err := m.GoogleAnalytics.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("googleAnalytics") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("googleAnalytics") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) contextValidateHelp(ctx context.Context, formats strfmt.Registry) error { - - if m.Help != nil { - - if swag.IsZero(m.Help) { // not required - return nil - } - - if err := m.Help.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("help") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("help") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) contextValidateKustomizeOptions(ctx context.Context, formats strfmt.Registry) error { - - if m.KustomizeOptions != nil { - - if swag.IsZero(m.KustomizeOptions) { // not required - return nil - } - - if err := m.KustomizeOptions.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kustomizeOptions") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kustomizeOptions") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) contextValidateOidcConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.OidcConfig != nil { - - if swag.IsZero(m.OidcConfig) { // not required - return nil - } - - if err := m.OidcConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("oidcConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("oidcConfig") - } - return err - } - } - - return nil -} - -func (m *ClusterSettings) contextValidatePlugins(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Plugins); i++ { - - if m.Plugins[i] != nil { - - if swag.IsZero(m.Plugins[i]) { // not required - return nil - } - - if err := m.Plugins[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugins" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugins" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ClusterSettings) contextValidateResourceOverrides(ctx context.Context, formats strfmt.Registry) error { - - for k := range m.ResourceOverrides { - - if val, ok := m.ResourceOverrides[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterSettings) UnmarshalBinary(b []byte) error { - var res ClusterSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/cluster_settings_plugins_response.go b/pkg/argocd/models/cluster_settings_plugins_response.go deleted file mode 100644 index 1877a66..0000000 --- a/pkg/argocd/models/cluster_settings_plugins_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ClusterSettingsPluginsResponse cluster settings plugins response -// -// swagger:model clusterSettingsPluginsResponse -type ClusterSettingsPluginsResponse struct { - - // plugins - Plugins []*ClusterPlugin `json:"plugins"` -} - -// Validate validates this cluster settings plugins response -func (m *ClusterSettingsPluginsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePlugins(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterSettingsPluginsResponse) validatePlugins(formats strfmt.Registry) error { - if swag.IsZero(m.Plugins) { // not required - return nil - } - - for i := 0; i < len(m.Plugins); i++ { - if swag.IsZero(m.Plugins[i]) { // not required - continue - } - - if m.Plugins[i] != nil { - if err := m.Plugins[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugins" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugins" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this cluster settings plugins response based on the context it is used -func (m *ClusterSettingsPluginsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePlugins(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ClusterSettingsPluginsResponse) contextValidatePlugins(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Plugins); i++ { - - if m.Plugins[i] != nil { - - if swag.IsZero(m.Plugins[i]) { // not required - return nil - } - - if err := m.Plugins[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugins" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugins" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterSettingsPluginsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterSettingsPluginsResponse) UnmarshalBinary(b []byte) error { - var res ClusterSettingsPluginsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/gpgkey_gnu_p_g_public_key_create_response.go b/pkg/argocd/models/gpgkey_gnu_p_g_public_key_create_response.go deleted file mode 100644 index e1284c7..0000000 --- a/pkg/argocd/models/gpgkey_gnu_p_g_public_key_create_response.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GpgkeyGnuPGPublicKeyCreateResponse Response to a public key creation request -// -// swagger:model gpgkeyGnuPGPublicKeyCreateResponse -type GpgkeyGnuPGPublicKeyCreateResponse struct { - - // created - Created *V1alpha1GnuPGPublicKeyList `json:"created,omitempty"` - - // List of key IDs that haven been skipped because they already exist on the server - Skipped []string `json:"skipped"` -} - -// Validate validates this gpgkey gnu p g public key create response -func (m *GpgkeyGnuPGPublicKeyCreateResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCreated(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpgkeyGnuPGPublicKeyCreateResponse) validateCreated(formats strfmt.Registry) error { - if swag.IsZero(m.Created) { // not required - return nil - } - - if m.Created != nil { - if err := m.Created.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("created") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("created") - } - return err - } - } - - return nil -} - -// ContextValidate validate this gpgkey gnu p g public key create response based on the context it is used -func (m *GpgkeyGnuPGPublicKeyCreateResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCreated(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *GpgkeyGnuPGPublicKeyCreateResponse) contextValidateCreated(ctx context.Context, formats strfmt.Registry) error { - - if m.Created != nil { - - if swag.IsZero(m.Created) { // not required - return nil - } - - if err := m.Created.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("created") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("created") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *GpgkeyGnuPGPublicKeyCreateResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GpgkeyGnuPGPublicKeyCreateResponse) UnmarshalBinary(b []byte) error { - var res GpgkeyGnuPGPublicKeyCreateResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/gpgkey_gnu_p_g_public_key_response.go b/pkg/argocd/models/gpgkey_gnu_p_g_public_key_response.go deleted file mode 100644 index f9e5afd..0000000 --- a/pkg/argocd/models/gpgkey_gnu_p_g_public_key_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// GpgkeyGnuPGPublicKeyResponse Generic (empty) response for GPG public key CRUD requests -// -// swagger:model gpgkeyGnuPGPublicKeyResponse -type GpgkeyGnuPGPublicKeyResponse interface{} diff --git a/pkg/argocd/models/intstr_int_or_string.go b/pkg/argocd/models/intstr_int_or_string.go deleted file mode 100644 index 724f7a2..0000000 --- a/pkg/argocd/models/intstr_int_or_string.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// IntstrIntOrString IntOrString is a type that can hold an int32 or a string. When used in -// JSON or YAML marshalling and unmarshalling, it produces or consumes the -// inner type. This allows you to have, for example, a JSON field that can -// accept a name or number. -// TODO: Rename to Int32OrString -// -// +protobuf=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -// +k8s:openapi-gen=true -// -// swagger:model intstrIntOrString -type IntstrIntOrString struct { - - // int val - IntVal int32 `json:"intVal,omitempty"` - - // str val - StrVal string `json:"strVal,omitempty"` - - // type - Type int64 `json:"type,omitempty"` -} - -// Validate validates this intstr int or string -func (m *IntstrIntOrString) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this intstr int or string based on context it is used -func (m *IntstrIntOrString) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *IntstrIntOrString) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *IntstrIntOrString) UnmarshalBinary(b []byte) error { - var res IntstrIntOrString - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/notification_service.go b/pkg/argocd/models/notification_service.go deleted file mode 100644 index 5f8aeaa..0000000 --- a/pkg/argocd/models/notification_service.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NotificationService notification service -// -// swagger:model notificationService -type NotificationService struct { - - // name - Name string `json:"name,omitempty"` -} - -// Validate validates this notification service -func (m *NotificationService) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this notification service based on context it is used -func (m *NotificationService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NotificationService) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NotificationService) UnmarshalBinary(b []byte) error { - var res NotificationService - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/notification_service_list.go b/pkg/argocd/models/notification_service_list.go deleted file mode 100644 index 4ba3bc1..0000000 --- a/pkg/argocd/models/notification_service_list.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NotificationServiceList notification service list -// -// swagger:model notificationServiceList -type NotificationServiceList struct { - - // items - Items []*NotificationService `json:"items"` -} - -// Validate validates this notification service list -func (m *NotificationServiceList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NotificationServiceList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this notification service list based on the context it is used -func (m *NotificationServiceList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NotificationServiceList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NotificationServiceList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NotificationServiceList) UnmarshalBinary(b []byte) error { - var res NotificationServiceList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/notification_template.go b/pkg/argocd/models/notification_template.go deleted file mode 100644 index fae5ceb..0000000 --- a/pkg/argocd/models/notification_template.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NotificationTemplate notification template -// -// swagger:model notificationTemplate -type NotificationTemplate struct { - - // name - Name string `json:"name,omitempty"` -} - -// Validate validates this notification template -func (m *NotificationTemplate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this notification template based on context it is used -func (m *NotificationTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NotificationTemplate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NotificationTemplate) UnmarshalBinary(b []byte) error { - var res NotificationTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/notification_template_list.go b/pkg/argocd/models/notification_template_list.go deleted file mode 100644 index 9d00429..0000000 --- a/pkg/argocd/models/notification_template_list.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NotificationTemplateList notification template list -// -// swagger:model notificationTemplateList -type NotificationTemplateList struct { - - // items - Items []*NotificationTemplate `json:"items"` -} - -// Validate validates this notification template list -func (m *NotificationTemplateList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NotificationTemplateList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this notification template list based on the context it is used -func (m *NotificationTemplateList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NotificationTemplateList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NotificationTemplateList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NotificationTemplateList) UnmarshalBinary(b []byte) error { - var res NotificationTemplateList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/notification_trigger.go b/pkg/argocd/models/notification_trigger.go deleted file mode 100644 index 00df750..0000000 --- a/pkg/argocd/models/notification_trigger.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NotificationTrigger notification trigger -// -// swagger:model notificationTrigger -type NotificationTrigger struct { - - // name - Name string `json:"name,omitempty"` -} - -// Validate validates this notification trigger -func (m *NotificationTrigger) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this notification trigger based on context it is used -func (m *NotificationTrigger) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *NotificationTrigger) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NotificationTrigger) UnmarshalBinary(b []byte) error { - var res NotificationTrigger - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/notification_trigger_list.go b/pkg/argocd/models/notification_trigger_list.go deleted file mode 100644 index f127566..0000000 --- a/pkg/argocd/models/notification_trigger_list.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NotificationTriggerList notification trigger list -// -// swagger:model notificationTriggerList -type NotificationTriggerList struct { - - // items - Items []*NotificationTrigger `json:"items"` -} - -// Validate validates this notification trigger list -func (m *NotificationTriggerList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NotificationTriggerList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this notification trigger list based on the context it is used -func (m *NotificationTriggerList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *NotificationTriggerList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *NotificationTriggerList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *NotificationTriggerList) UnmarshalBinary(b []byte) error { - var res NotificationTriggerList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/oidc_claim.go b/pkg/argocd/models/oidc_claim.go deleted file mode 100644 index ae6aba0..0000000 --- a/pkg/argocd/models/oidc_claim.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// OidcClaim oidc claim -// -// swagger:model oidcClaim -type OidcClaim struct { - - // essential - Essential bool `json:"essential,omitempty"` - - // value - Value string `json:"value,omitempty"` - - // values - Values []string `json:"values"` -} - -// Validate validates this oidc claim -func (m *OidcClaim) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this oidc claim based on context it is used -func (m *OidcClaim) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *OidcClaim) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *OidcClaim) UnmarshalBinary(b []byte) error { - var res OidcClaim - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/project_detailed_projects_response.go b/pkg/argocd/models/project_detailed_projects_response.go deleted file mode 100644 index 6ecc2d6..0000000 --- a/pkg/argocd/models/project_detailed_projects_response.go +++ /dev/null @@ -1,296 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProjectDetailedProjectsResponse project detailed projects response -// -// swagger:model projectDetailedProjectsResponse -type ProjectDetailedProjectsResponse struct { - - // clusters - Clusters []*V1alpha1Cluster `json:"clusters"` - - // global projects - GlobalProjects []*V1alpha1AppProject `json:"globalProjects"` - - // project - Project *V1alpha1AppProject `json:"project,omitempty"` - - // repositories - Repositories []*V1alpha1Repository `json:"repositories"` -} - -// Validate validates this project detailed projects response -func (m *ProjectDetailedProjectsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGlobalProjects(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRepositories(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectDetailedProjectsResponse) validateClusters(formats strfmt.Registry) error { - if swag.IsZero(m.Clusters) { // not required - return nil - } - - for i := 0; i < len(m.Clusters); i++ { - if swag.IsZero(m.Clusters[i]) { // not required - continue - } - - if m.Clusters[i] != nil { - if err := m.Clusters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProjectDetailedProjectsResponse) validateGlobalProjects(formats strfmt.Registry) error { - if swag.IsZero(m.GlobalProjects) { // not required - return nil - } - - for i := 0; i < len(m.GlobalProjects); i++ { - if swag.IsZero(m.GlobalProjects[i]) { // not required - continue - } - - if m.GlobalProjects[i] != nil { - if err := m.GlobalProjects[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalProjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalProjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProjectDetailedProjectsResponse) validateProject(formats strfmt.Registry) error { - if swag.IsZero(m.Project) { // not required - return nil - } - - if m.Project != nil { - if err := m.Project.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -func (m *ProjectDetailedProjectsResponse) validateRepositories(formats strfmt.Registry) error { - if swag.IsZero(m.Repositories) { // not required - return nil - } - - for i := 0; i < len(m.Repositories); i++ { - if swag.IsZero(m.Repositories[i]) { // not required - continue - } - - if m.Repositories[i] != nil { - if err := m.Repositories[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("repositories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("repositories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this project detailed projects response based on the context it is used -func (m *ProjectDetailedProjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGlobalProjects(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateProject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRepositories(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectDetailedProjectsResponse) contextValidateClusters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Clusters); i++ { - - if m.Clusters[i] != nil { - - if swag.IsZero(m.Clusters[i]) { // not required - return nil - } - - if err := m.Clusters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProjectDetailedProjectsResponse) contextValidateGlobalProjects(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.GlobalProjects); i++ { - - if m.GlobalProjects[i] != nil { - - if swag.IsZero(m.GlobalProjects[i]) { // not required - return nil - } - - if err := m.GlobalProjects[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("globalProjects" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("globalProjects" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *ProjectDetailedProjectsResponse) contextValidateProject(ctx context.Context, formats strfmt.Registry) error { - - if m.Project != nil { - - if swag.IsZero(m.Project) { // not required - return nil - } - - if err := m.Project.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -func (m *ProjectDetailedProjectsResponse) contextValidateRepositories(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Repositories); i++ { - - if m.Repositories[i] != nil { - - if swag.IsZero(m.Repositories[i]) { // not required - return nil - } - - if err := m.Repositories[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("repositories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("repositories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectDetailedProjectsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectDetailedProjectsResponse) UnmarshalBinary(b []byte) error { - var res ProjectDetailedProjectsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/project_empty_response.go b/pkg/argocd/models/project_empty_response.go deleted file mode 100644 index 8dfb00c..0000000 --- a/pkg/argocd/models/project_empty_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// ProjectEmptyResponse project empty response -// -// swagger:model projectEmptyResponse -type ProjectEmptyResponse interface{} diff --git a/pkg/argocd/models/project_global_projects_response.go b/pkg/argocd/models/project_global_projects_response.go deleted file mode 100644 index b911b51..0000000 --- a/pkg/argocd/models/project_global_projects_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProjectGlobalProjectsResponse project global projects response -// -// swagger:model projectGlobalProjectsResponse -type ProjectGlobalProjectsResponse struct { - - // items - Items []*V1alpha1AppProject `json:"items"` -} - -// Validate validates this project global projects response -func (m *ProjectGlobalProjectsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectGlobalProjectsResponse) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this project global projects response based on the context it is used -func (m *ProjectGlobalProjectsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectGlobalProjectsResponse) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectGlobalProjectsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectGlobalProjectsResponse) UnmarshalBinary(b []byte) error { - var res ProjectGlobalProjectsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/project_project_create_request.go b/pkg/argocd/models/project_project_create_request.go deleted file mode 100644 index b173077..0000000 --- a/pkg/argocd/models/project_project_create_request.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProjectProjectCreateRequest ProjectCreateRequest defines project creation parameters. -// -// swagger:model projectProjectCreateRequest -type ProjectProjectCreateRequest struct { - - // project - Project *V1alpha1AppProject `json:"project,omitempty"` - - // upsert - Upsert bool `json:"upsert,omitempty"` -} - -// Validate validates this project project create request -func (m *ProjectProjectCreateRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectProjectCreateRequest) validateProject(formats strfmt.Registry) error { - if swag.IsZero(m.Project) { // not required - return nil - } - - if m.Project != nil { - if err := m.Project.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -// ContextValidate validate this project project create request based on the context it is used -func (m *ProjectProjectCreateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectProjectCreateRequest) contextValidateProject(ctx context.Context, formats strfmt.Registry) error { - - if m.Project != nil { - - if swag.IsZero(m.Project) { // not required - return nil - } - - if err := m.Project.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectProjectCreateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectProjectCreateRequest) UnmarshalBinary(b []byte) error { - var res ProjectProjectCreateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/project_project_token_create_request.go b/pkg/argocd/models/project_project_token_create_request.go deleted file mode 100644 index b69b1d2..0000000 --- a/pkg/argocd/models/project_project_token_create_request.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProjectProjectTokenCreateRequest ProjectTokenCreateRequest defines project token creation parameters. -// -// swagger:model projectProjectTokenCreateRequest -type ProjectProjectTokenCreateRequest struct { - - // description - Description string `json:"description,omitempty"` - - // expiresIn represents a duration in seconds - ExpiresIn int64 `json:"expiresIn,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // project - Project string `json:"project,omitempty"` - - // role - Role string `json:"role,omitempty"` -} - -// Validate validates this project project token create request -func (m *ProjectProjectTokenCreateRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this project project token create request based on context it is used -func (m *ProjectProjectTokenCreateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectProjectTokenCreateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectProjectTokenCreateRequest) UnmarshalBinary(b []byte) error { - var res ProjectProjectTokenCreateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/project_project_token_response.go b/pkg/argocd/models/project_project_token_response.go deleted file mode 100644 index 7941e08..0000000 --- a/pkg/argocd/models/project_project_token_response.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProjectProjectTokenResponse ProjectTokenResponse wraps the created token or returns an empty string if deleted. -// -// swagger:model projectProjectTokenResponse -type ProjectProjectTokenResponse struct { - - // token - Token string `json:"token,omitempty"` -} - -// Validate validates this project project token response -func (m *ProjectProjectTokenResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this project project token response based on context it is used -func (m *ProjectProjectTokenResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectProjectTokenResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectProjectTokenResponse) UnmarshalBinary(b []byte) error { - var res ProjectProjectTokenResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/project_project_update_request.go b/pkg/argocd/models/project_project_update_request.go deleted file mode 100644 index 5d99b6c..0000000 --- a/pkg/argocd/models/project_project_update_request.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProjectProjectUpdateRequest project project update request -// -// swagger:model projectProjectUpdateRequest -type ProjectProjectUpdateRequest struct { - - // project - Project *V1alpha1AppProject `json:"project,omitempty"` -} - -// Validate validates this project project update request -func (m *ProjectProjectUpdateRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectProjectUpdateRequest) validateProject(formats strfmt.Registry) error { - if swag.IsZero(m.Project) { // not required - return nil - } - - if m.Project != nil { - if err := m.Project.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -// ContextValidate validate this project project update request based on the context it is used -func (m *ProjectProjectUpdateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateProject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectProjectUpdateRequest) contextValidateProject(ctx context.Context, formats strfmt.Registry) error { - - if m.Project != nil { - - if swag.IsZero(m.Project) { // not required - return nil - } - - if err := m.Project.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("project") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("project") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectProjectUpdateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectProjectUpdateRequest) UnmarshalBinary(b []byte) error { - var res ProjectProjectUpdateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/project_sync_windows_response.go b/pkg/argocd/models/project_sync_windows_response.go deleted file mode 100644 index a5e51e6..0000000 --- a/pkg/argocd/models/project_sync_windows_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProjectSyncWindowsResponse project sync windows response -// -// swagger:model projectSyncWindowsResponse -type ProjectSyncWindowsResponse struct { - - // windows - Windows []*V1alpha1SyncWindow `json:"windows"` -} - -// Validate validates this project sync windows response -func (m *ProjectSyncWindowsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWindows(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectSyncWindowsResponse) validateWindows(formats strfmt.Registry) error { - if swag.IsZero(m.Windows) { // not required - return nil - } - - for i := 0; i < len(m.Windows); i++ { - if swag.IsZero(m.Windows[i]) { // not required - continue - } - - if m.Windows[i] != nil { - if err := m.Windows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this project sync windows response based on the context it is used -func (m *ProjectSyncWindowsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ProjectSyncWindowsResponse) contextValidateWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Windows); i++ { - - if m.Windows[i] != nil { - - if swag.IsZero(m.Windows[i]) { // not required - return nil - } - - if err := m.Windows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("windows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("windows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ProjectSyncWindowsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProjectSyncWindowsResponse) UnmarshalBinary(b []byte) error { - var res ProjectSyncWindowsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/protobuf_any.go b/pkg/argocd/models/protobuf_any.go deleted file mode 100644 index 8b8f2b0..0000000 --- a/pkg/argocd/models/protobuf_any.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ProtobufAny protobuf any -// -// swagger:model protobufAny -type ProtobufAny struct { - - // type url - TypeURL string `json:"type_url,omitempty"` - - // value - // Format: byte - Value strfmt.Base64 `json:"value,omitempty"` -} - -// Validate validates this protobuf any -func (m *ProtobufAny) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this protobuf any based on context it is used -func (m *ProtobufAny) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ProtobufAny) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ProtobufAny) UnmarshalBinary(b []byte) error { - var res ProtobufAny - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repocreds_repo_creds_response.go b/pkg/argocd/models/repocreds_repo_creds_response.go deleted file mode 100644 index c93f442..0000000 --- a/pkg/argocd/models/repocreds_repo_creds_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// RepocredsRepoCredsResponse RepoCredsResponse is a response to most repository credentials requests -// -// swagger:model repocredsRepoCredsResponse -type RepocredsRepoCredsResponse interface{} diff --git a/pkg/argocd/models/repository_app_info.go b/pkg/argocd/models/repository_app_info.go deleted file mode 100644 index 2021962..0000000 --- a/pkg/argocd/models/repository_app_info.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryAppInfo AppInfo contains application type and app file path -// -// swagger:model repositoryAppInfo -type RepositoryAppInfo struct { - - // path - Path string `json:"path,omitempty"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this repository app info -func (m *RepositoryAppInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this repository app info based on context it is used -func (m *RepositoryAppInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryAppInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryAppInfo) UnmarshalBinary(b []byte) error { - var res RepositoryAppInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_directory_app_spec.go b/pkg/argocd/models/repository_directory_app_spec.go deleted file mode 100644 index e2270e2..0000000 --- a/pkg/argocd/models/repository_directory_app_spec.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// RepositoryDirectoryAppSpec DirectoryAppSpec contains directory -// -// swagger:model repositoryDirectoryAppSpec -type RepositoryDirectoryAppSpec interface{} diff --git a/pkg/argocd/models/repository_helm_app_spec.go b/pkg/argocd/models/repository_helm_app_spec.go deleted file mode 100644 index 270e7e0..0000000 --- a/pkg/argocd/models/repository_helm_app_spec.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryHelmAppSpec HelmAppSpec contains helm app name in source repo -// -// swagger:model repositoryHelmAppSpec -type RepositoryHelmAppSpec struct { - - // helm file parameters - FileParameters []*V1alpha1HelmFileParameter `json:"fileParameters"` - - // name - Name string `json:"name,omitempty"` - - // the output of `helm inspect values` - Parameters []*V1alpha1HelmParameter `json:"parameters"` - - // value files - ValueFiles []string `json:"valueFiles"` - - // the contents of values.yaml - Values string `json:"values,omitempty"` -} - -// Validate validates this repository helm app spec -func (m *RepositoryHelmAppSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryHelmAppSpec) validateFileParameters(formats strfmt.Registry) error { - if swag.IsZero(m.FileParameters) { // not required - return nil - } - - for i := 0; i < len(m.FileParameters); i++ { - if swag.IsZero(m.FileParameters[i]) { // not required - continue - } - - if m.FileParameters[i] != nil { - if err := m.FileParameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RepositoryHelmAppSpec) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required - return nil - } - - for i := 0; i < len(m.Parameters); i++ { - if swag.IsZero(m.Parameters[i]) { // not required - continue - } - - if m.Parameters[i] != nil { - if err := m.Parameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this repository helm app spec based on the context it is used -func (m *RepositoryHelmAppSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryHelmAppSpec) contextValidateFileParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileParameters); i++ { - - if m.FileParameters[i] != nil { - - if swag.IsZero(m.FileParameters[i]) { // not required - return nil - } - - if err := m.FileParameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RepositoryHelmAppSpec) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Parameters); i++ { - - if m.Parameters[i] != nil { - - if swag.IsZero(m.Parameters[i]) { // not required - return nil - } - - if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryHelmAppSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryHelmAppSpec) UnmarshalBinary(b []byte) error { - var res RepositoryHelmAppSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_helm_chart.go b/pkg/argocd/models/repository_helm_chart.go deleted file mode 100644 index 2b785e8..0000000 --- a/pkg/argocd/models/repository_helm_chart.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryHelmChart repository helm chart -// -// swagger:model repositoryHelmChart -type RepositoryHelmChart struct { - - // name - Name string `json:"name,omitempty"` - - // versions - Versions []string `json:"versions"` -} - -// Validate validates this repository helm chart -func (m *RepositoryHelmChart) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this repository helm chart based on context it is used -func (m *RepositoryHelmChart) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryHelmChart) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryHelmChart) UnmarshalBinary(b []byte) error { - var res RepositoryHelmChart - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_helm_charts_response.go b/pkg/argocd/models/repository_helm_charts_response.go deleted file mode 100644 index 38a95af..0000000 --- a/pkg/argocd/models/repository_helm_charts_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryHelmChartsResponse repository helm charts response -// -// swagger:model repositoryHelmChartsResponse -type RepositoryHelmChartsResponse struct { - - // items - Items []*RepositoryHelmChart `json:"items"` -} - -// Validate validates this repository helm charts response -func (m *RepositoryHelmChartsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryHelmChartsResponse) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this repository helm charts response based on the context it is used -func (m *RepositoryHelmChartsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryHelmChartsResponse) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryHelmChartsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryHelmChartsResponse) UnmarshalBinary(b []byte) error { - var res RepositoryHelmChartsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_kustomize_app_spec.go b/pkg/argocd/models/repository_kustomize_app_spec.go deleted file mode 100644 index b2453e9..0000000 --- a/pkg/argocd/models/repository_kustomize_app_spec.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryKustomizeAppSpec KustomizeAppSpec contains kustomize images -// -// swagger:model repositoryKustomizeAppSpec -type RepositoryKustomizeAppSpec struct { - - // images is a list of available images. - Images []string `json:"images"` -} - -// Validate validates this repository kustomize app spec -func (m *RepositoryKustomizeAppSpec) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this repository kustomize app spec based on context it is used -func (m *RepositoryKustomizeAppSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryKustomizeAppSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryKustomizeAppSpec) UnmarshalBinary(b []byte) error { - var res RepositoryKustomizeAppSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_manifest_response.go b/pkg/argocd/models/repository_manifest_response.go deleted file mode 100644 index 02650a6..0000000 --- a/pkg/argocd/models/repository_manifest_response.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryManifestResponse repository manifest response -// -// swagger:model repositoryManifestResponse -type RepositoryManifestResponse struct { - - // manifests - Manifests []string `json:"manifests"` - - // namespace - Namespace string `json:"namespace,omitempty"` - - // resolved revision - Revision string `json:"revision,omitempty"` - - // server - Server string `json:"server,omitempty"` - - // source type - SourceType string `json:"sourceType,omitempty"` - - // Raw response of git verify-commit operation (always the empty string for Helm) - VerifyResult string `json:"verifyResult,omitempty"` -} - -// Validate validates this repository manifest response -func (m *RepositoryManifestResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this repository manifest response based on context it is used -func (m *RepositoryManifestResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryManifestResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryManifestResponse) UnmarshalBinary(b []byte) error { - var res RepositoryManifestResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_parameter_announcement.go b/pkg/argocd/models/repository_parameter_announcement.go deleted file mode 100644 index d324d5c..0000000 --- a/pkg/argocd/models/repository_parameter_announcement.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryParameterAnnouncement repository parameter announcement -// -// swagger:model repositoryParameterAnnouncement -type RepositoryParameterAnnouncement struct { - - // array is the default value of the parameter if the parameter is an array. - Array []string `json:"array"` - - // collectionType is the type of value this parameter holds - either a single value (a string) or a collection - // (array or map). If collectionType is set, only the field with that type will be used. If collectionType is not - // set, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown. - CollectionType string `json:"collectionType,omitempty"` - - // itemType determines the primitive data type represented by the parameter. Parameters are always encoded as - // strings, but this field lets them be interpreted as other primitive types. - ItemType string `json:"itemType,omitempty"` - - // map is the default value of the parameter if the parameter is a map. - Map map[string]string `json:"map,omitempty"` - - // name is the name identifying a parameter. - Name string `json:"name,omitempty"` - - // required defines if this given parameter is mandatory. - Required bool `json:"required,omitempty"` - - // string is the default value of the parameter if the parameter is a string. - String string `json:"string,omitempty"` - - // title is a human-readable text of the parameter name. - Title string `json:"title,omitempty"` - - // tooltip is a human-readable description of the parameter. - Tooltip string `json:"tooltip,omitempty"` -} - -// Validate validates this repository parameter announcement -func (m *RepositoryParameterAnnouncement) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this repository parameter announcement based on context it is used -func (m *RepositoryParameterAnnouncement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryParameterAnnouncement) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryParameterAnnouncement) UnmarshalBinary(b []byte) error { - var res RepositoryParameterAnnouncement - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_plugin_app_spec.go b/pkg/argocd/models/repository_plugin_app_spec.go deleted file mode 100644 index 5c94b5b..0000000 --- a/pkg/argocd/models/repository_plugin_app_spec.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryPluginAppSpec PluginAppSpec contains details about a plugin-type Application -// -// swagger:model repositoryPluginAppSpec -type RepositoryPluginAppSpec struct { - - // parameters announcement - ParametersAnnouncement []*RepositoryParameterAnnouncement `json:"parametersAnnouncement"` -} - -// Validate validates this repository plugin app spec -func (m *RepositoryPluginAppSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParametersAnnouncement(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryPluginAppSpec) validateParametersAnnouncement(formats strfmt.Registry) error { - if swag.IsZero(m.ParametersAnnouncement) { // not required - return nil - } - - for i := 0; i < len(m.ParametersAnnouncement); i++ { - if swag.IsZero(m.ParametersAnnouncement[i]) { // not required - continue - } - - if m.ParametersAnnouncement[i] != nil { - if err := m.ParametersAnnouncement[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parametersAnnouncement" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parametersAnnouncement" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this repository plugin app spec based on the context it is used -func (m *RepositoryPluginAppSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParametersAnnouncement(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryPluginAppSpec) contextValidateParametersAnnouncement(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ParametersAnnouncement); i++ { - - if m.ParametersAnnouncement[i] != nil { - - if swag.IsZero(m.ParametersAnnouncement[i]) { // not required - return nil - } - - if err := m.ParametersAnnouncement[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parametersAnnouncement" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parametersAnnouncement" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryPluginAppSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryPluginAppSpec) UnmarshalBinary(b []byte) error { - var res RepositoryPluginAppSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_refs.go b/pkg/argocd/models/repository_refs.go deleted file mode 100644 index f6247cd..0000000 --- a/pkg/argocd/models/repository_refs.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryRefs A subset of the repository's named refs -// -// swagger:model repositoryRefs -type RepositoryRefs struct { - - // branches - Branches []string `json:"branches"` - - // tags - Tags []string `json:"tags"` -} - -// Validate validates this repository refs -func (m *RepositoryRefs) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this repository refs based on context it is used -func (m *RepositoryRefs) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryRefs) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryRefs) UnmarshalBinary(b []byte) error { - var res RepositoryRefs - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_repo_app_details_query.go b/pkg/argocd/models/repository_repo_app_details_query.go deleted file mode 100644 index 814ca36..0000000 --- a/pkg/argocd/models/repository_repo_app_details_query.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryRepoAppDetailsQuery RepoAppDetailsQuery contains query information for app details request -// -// swagger:model repositoryRepoAppDetailsQuery -type RepositoryRepoAppDetailsQuery struct { - - // app name - AppName string `json:"appName,omitempty"` - - // app project - AppProject string `json:"appProject,omitempty"` - - // source - Source *V1alpha1ApplicationSource `json:"source,omitempty"` - - // source index (for multi source apps) - SourceIndex int32 `json:"sourceIndex,omitempty"` - - // versionId from historical data (for multi source apps) - VersionID int32 `json:"versionId,omitempty"` -} - -// Validate validates this repository repo app details query -func (m *RepositoryRepoAppDetailsQuery) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryRepoAppDetailsQuery) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this repository repo app details query based on the context it is used -func (m *RepositoryRepoAppDetailsQuery) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryRepoAppDetailsQuery) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryRepoAppDetailsQuery) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryRepoAppDetailsQuery) UnmarshalBinary(b []byte) error { - var res RepositoryRepoAppDetailsQuery - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_repo_app_details_response.go b/pkg/argocd/models/repository_repo_app_details_response.go deleted file mode 100644 index 48ed2c0..0000000 --- a/pkg/argocd/models/repository_repo_app_details_response.go +++ /dev/null @@ -1,217 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryRepoAppDetailsResponse RepoAppDetailsResponse application details -// -// swagger:model repositoryRepoAppDetailsResponse -type RepositoryRepoAppDetailsResponse struct { - - // directory - Directory RepositoryDirectoryAppSpec `json:"directory,omitempty"` - - // helm - Helm *RepositoryHelmAppSpec `json:"helm,omitempty"` - - // kustomize - Kustomize *RepositoryKustomizeAppSpec `json:"kustomize,omitempty"` - - // plugin - Plugin *RepositoryPluginAppSpec `json:"plugin,omitempty"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this repository repo app details response -func (m *RepositoryRepoAppDetailsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHelm(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKustomize(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePlugin(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryRepoAppDetailsResponse) validateHelm(formats strfmt.Registry) error { - if swag.IsZero(m.Helm) { // not required - return nil - } - - if m.Helm != nil { - if err := m.Helm.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("helm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("helm") - } - return err - } - } - - return nil -} - -func (m *RepositoryRepoAppDetailsResponse) validateKustomize(formats strfmt.Registry) error { - if swag.IsZero(m.Kustomize) { // not required - return nil - } - - if m.Kustomize != nil { - if err := m.Kustomize.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kustomize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kustomize") - } - return err - } - } - - return nil -} - -func (m *RepositoryRepoAppDetailsResponse) validatePlugin(formats strfmt.Registry) error { - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if m.Plugin != nil { - if err := m.Plugin.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -// ContextValidate validate this repository repo app details response based on the context it is used -func (m *RepositoryRepoAppDetailsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHelm(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKustomize(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePlugin(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryRepoAppDetailsResponse) contextValidateHelm(ctx context.Context, formats strfmt.Registry) error { - - if m.Helm != nil { - - if swag.IsZero(m.Helm) { // not required - return nil - } - - if err := m.Helm.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("helm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("helm") - } - return err - } - } - - return nil -} - -func (m *RepositoryRepoAppDetailsResponse) contextValidateKustomize(ctx context.Context, formats strfmt.Registry) error { - - if m.Kustomize != nil { - - if swag.IsZero(m.Kustomize) { // not required - return nil - } - - if err := m.Kustomize.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kustomize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kustomize") - } - return err - } - } - - return nil -} - -func (m *RepositoryRepoAppDetailsResponse) contextValidatePlugin(ctx context.Context, formats strfmt.Registry) error { - - if m.Plugin != nil { - - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if err := m.Plugin.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryRepoAppDetailsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryRepoAppDetailsResponse) UnmarshalBinary(b []byte) error { - var res RepositoryRepoAppDetailsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_repo_apps_response.go b/pkg/argocd/models/repository_repo_apps_response.go deleted file mode 100644 index 392c7c4..0000000 --- a/pkg/argocd/models/repository_repo_apps_response.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RepositoryRepoAppsResponse RepoAppsResponse contains applications of specified repository -// -// swagger:model repositoryRepoAppsResponse -type RepositoryRepoAppsResponse struct { - - // items - Items []*RepositoryAppInfo `json:"items"` -} - -// Validate validates this repository repo apps response -func (m *RepositoryRepoAppsResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryRepoAppsResponse) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this repository repo apps response based on the context it is used -func (m *RepositoryRepoAppsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepositoryRepoAppsResponse) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepositoryRepoAppsResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepositoryRepoAppsResponse) UnmarshalBinary(b []byte) error { - var res RepositoryRepoAppsResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/repository_repo_response.go b/pkg/argocd/models/repository_repo_response.go deleted file mode 100644 index 44a1cfa..0000000 --- a/pkg/argocd/models/repository_repo_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// RepositoryRepoResponse repository repo response -// -// swagger:model repositoryRepoResponse -type RepositoryRepoResponse interface{} diff --git a/pkg/argocd/models/runtime_error.go b/pkg/argocd/models/runtime_error.go deleted file mode 100644 index aec95fd..0000000 --- a/pkg/argocd/models/runtime_error.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RuntimeError runtime error -// -// swagger:model runtimeError -type RuntimeError struct { - - // code - Code int32 `json:"code,omitempty"` - - // details - Details []*ProtobufAny `json:"details"` - - // error - Error string `json:"error,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime error -func (m *RuntimeError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this runtime error based on the context it is used -func (m *RuntimeError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeError) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Details); i++ { - - if m.Details[i] != nil { - - if swag.IsZero(m.Details[i]) { // not required - return nil - } - - if err := m.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeError) UnmarshalBinary(b []byte) error { - var res RuntimeError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/runtime_raw_extension.go b/pkg/argocd/models/runtime_raw_extension.go deleted file mode 100644 index 28b9c61..0000000 --- a/pkg/argocd/models/runtime_raw_extension.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RuntimeRawExtension RawExtension is used to hold extensions in external versions. -// -// To use this, make a field which has RawExtension as its type in your external, versioned -// struct, and Object in your internal struct. You also need to register your -// various plugin types. -// -// // Internal package: -// -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.Object `json:"myPlugin"` -// } -// -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // External package: -// -// type MyAPIObject struct { -// runtime.TypeMeta `json:",inline"` -// MyPlugin runtime.RawExtension `json:"myPlugin"` -// } -// -// type PluginA struct { -// AOption string `json:"aOption"` -// } -// -// // On the wire, the JSON will look something like this: -// -// { -// "kind":"MyAPIObject", -// "apiVersion":"v1", -// "myPlugin": { -// "kind":"PluginA", -// "aOption":"foo", -// }, -// } -// -// So what happens? Decode first uses json or yaml to unmarshal the serialized data into -// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. -// The next step is to copy (using pkg/conversion) into the internal struct. The runtime -// package's DefaultScheme has conversion functions installed which will unpack the -// JSON stored in RawExtension, turning it into the correct object type, and storing it -// in the Object. (TODO: In the case where the object is of an unknown type, a -// runtime.Unknown object will be created and stored.) -// -// +k8s:deepcopy-gen=true -// +protobuf=true -// +k8s:openapi-gen=true -// -// swagger:model runtimeRawExtension -type RuntimeRawExtension struct { - - // Raw is the underlying serialization of this object. - // - // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. - // Format: byte - Raw strfmt.Base64 `json:"raw,omitempty"` -} - -// Validate validates this runtime raw extension -func (m *RuntimeRawExtension) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this runtime raw extension based on context it is used -func (m *RuntimeRawExtension) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeRawExtension) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeRawExtension) UnmarshalBinary(b []byte) error { - var res RuntimeRawExtension - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/runtime_stream_error.go b/pkg/argocd/models/runtime_stream_error.go deleted file mode 100644 index 4da1e75..0000000 --- a/pkg/argocd/models/runtime_stream_error.go +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// RuntimeStreamError runtime stream error -// -// swagger:model runtimeStreamError -type RuntimeStreamError struct { - - // details - Details []*ProtobufAny `json:"details"` - - // grpc code - GrpcCode int32 `json:"grpc_code,omitempty"` - - // http code - HTTPCode int32 `json:"http_code,omitempty"` - - // http status - HTTPStatus string `json:"http_status,omitempty"` - - // message - Message string `json:"message,omitempty"` -} - -// Validate validates this runtime stream error -func (m *RuntimeStreamError) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeStreamError) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(m.Details) { // not required - return nil - } - - for i := 0; i < len(m.Details); i++ { - if swag.IsZero(m.Details[i]) { // not required - continue - } - - if m.Details[i] != nil { - if err := m.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this runtime stream error based on the context it is used -func (m *RuntimeStreamError) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RuntimeStreamError) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Details); i++ { - - if m.Details[i] != nil { - - if swag.IsZero(m.Details[i]) { // not required - return nil - } - - if err := m.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RuntimeStreamError) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RuntimeStreamError) UnmarshalBinary(b []byte) error { - var res RuntimeStreamError - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/session_get_user_info_response.go b/pkg/argocd/models/session_get_user_info_response.go deleted file mode 100644 index bf56de1..0000000 --- a/pkg/argocd/models/session_get_user_info_response.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SessionGetUserInfoResponse The current user's userInfo info -// -// swagger:model sessionGetUserInfoResponse -type SessionGetUserInfoResponse struct { - - // groups - Groups []string `json:"groups"` - - // iss - Iss string `json:"iss,omitempty"` - - // logged in - LoggedIn bool `json:"loggedIn,omitempty"` - - // username - Username string `json:"username,omitempty"` -} - -// Validate validates this session get user info response -func (m *SessionGetUserInfoResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this session get user info response based on context it is used -func (m *SessionGetUserInfoResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SessionGetUserInfoResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SessionGetUserInfoResponse) UnmarshalBinary(b []byte) error { - var res SessionGetUserInfoResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/session_session_create_request.go b/pkg/argocd/models/session_session_create_request.go deleted file mode 100644 index 0e2891b..0000000 --- a/pkg/argocd/models/session_session_create_request.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SessionSessionCreateRequest SessionCreateRequest is for logging in. -// -// swagger:model sessionSessionCreateRequest -type SessionSessionCreateRequest struct { - - // password - Password string `json:"password,omitempty"` - - // token - Token string `json:"token,omitempty"` - - // username - Username string `json:"username,omitempty"` -} - -// Validate validates this session session create request -func (m *SessionSessionCreateRequest) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this session session create request based on context it is used -func (m *SessionSessionCreateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SessionSessionCreateRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SessionSessionCreateRequest) UnmarshalBinary(b []byte) error { - var res SessionSessionCreateRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/session_session_response.go b/pkg/argocd/models/session_session_response.go deleted file mode 100644 index 84bb060..0000000 --- a/pkg/argocd/models/session_session_response.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// SessionSessionResponse SessionResponse wraps the created token or returns an empty string if deleted. -// -// swagger:model sessionSessionResponse -type SessionSessionResponse struct { - - // token - Token string `json:"token,omitempty"` -} - -// Validate validates this session session response -func (m *SessionSessionResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this session session response based on context it is used -func (m *SessionSessionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SessionSessionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SessionSessionResponse) UnmarshalBinary(b []byte) error { - var res SessionSessionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_event.go b/pkg/argocd/models/v1_event.go deleted file mode 100644 index 2fc77fa..0000000 --- a/pkg/argocd/models/v1_event.go +++ /dev/null @@ -1,494 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1Event Event is a report of an event somewhere in the cluster. Events -// have a limited retention time and triggers and messages may evolve -// with time. Event consumers should not rely on the timing of an event -// with a given Reason reflecting a consistent underlying trigger, or the -// continued existence of events with that Reason. Events should be -// treated as informative, best-effort, supplemental data. -// -// swagger:model v1Event -type V1Event struct { - - // What action was taken/failed regarding to the Regarding object. - // +optional - Action string `json:"action,omitempty"` - - // The number of times this event has occurred. - // +optional - Count int32 `json:"count,omitempty"` - - // event time - EventTime *V1MicroTime `json:"eventTime,omitempty"` - - // first timestamp - // Format: date-time - FirstTimestamp V1Time `json:"firstTimestamp,omitempty"` - - // involved object - InvolvedObject *V1ObjectReference `json:"involvedObject,omitempty"` - - // last timestamp - // Format: date-time - LastTimestamp V1Time `json:"lastTimestamp,omitempty"` - - // A human-readable description of the status of this operation. - // TODO: decide on maximum length. - // +optional - Message string `json:"message,omitempty"` - - // metadata - Metadata *V1ObjectMeta `json:"metadata,omitempty"` - - // This should be a short, machine understandable string that gives the reason - // for the transition into the object's current status. - // TODO: provide exact specification for format. - // +optional - Reason string `json:"reason,omitempty"` - - // related - Related *V1ObjectReference `json:"related,omitempty"` - - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. - // +optional - ReportingComponent string `json:"reportingComponent,omitempty"` - - // ID of the controller instance, e.g. `kubelet-xyzf`. - // +optional - ReportingInstance string `json:"reportingInstance,omitempty"` - - // series - Series *V1EventSeries `json:"series,omitempty"` - - // source - Source *V1EventSource `json:"source,omitempty"` - - // Type of this event (Normal, Warning), new types could be added in the future - // +optional - Type string `json:"type,omitempty"` -} - -// Validate validates this v1 event -func (m *V1Event) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEventTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFirstTimestamp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInvolvedObject(formats); err != nil { - res = append(res, err) - } - - if err := m.validateLastTimestamp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRelated(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSeries(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Event) validateEventTime(formats strfmt.Registry) error { - if swag.IsZero(m.EventTime) { // not required - return nil - } - - if m.EventTime != nil { - if err := m.EventTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("eventTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("eventTime") - } - return err - } - } - - return nil -} - -func (m *V1Event) validateFirstTimestamp(formats strfmt.Registry) error { - if swag.IsZero(m.FirstTimestamp) { // not required - return nil - } - - if err := m.FirstTimestamp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("firstTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("firstTimestamp") - } - return err - } - - return nil -} - -func (m *V1Event) validateInvolvedObject(formats strfmt.Registry) error { - if swag.IsZero(m.InvolvedObject) { // not required - return nil - } - - if m.InvolvedObject != nil { - if err := m.InvolvedObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("involvedObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("involvedObject") - } - return err - } - } - - return nil -} - -func (m *V1Event) validateLastTimestamp(formats strfmt.Registry) error { - if swag.IsZero(m.LastTimestamp) { // not required - return nil - } - - if err := m.LastTimestamp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTimestamp") - } - return err - } - - return nil -} - -func (m *V1Event) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1Event) validateRelated(formats strfmt.Registry) error { - if swag.IsZero(m.Related) { // not required - return nil - } - - if m.Related != nil { - if err := m.Related.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("related") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("related") - } - return err - } - } - - return nil -} - -func (m *V1Event) validateSeries(formats strfmt.Registry) error { - if swag.IsZero(m.Series) { // not required - return nil - } - - if m.Series != nil { - if err := m.Series.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("series") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("series") - } - return err - } - } - - return nil -} - -func (m *V1Event) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1 event based on the context it is used -func (m *V1Event) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEventTime(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFirstTimestamp(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInvolvedObject(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateLastTimestamp(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRelated(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSeries(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1Event) contextValidateEventTime(ctx context.Context, formats strfmt.Registry) error { - - if m.EventTime != nil { - - if swag.IsZero(m.EventTime) { // not required - return nil - } - - if err := m.EventTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("eventTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("eventTime") - } - return err - } - } - - return nil -} - -func (m *V1Event) contextValidateFirstTimestamp(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.FirstTimestamp) { // not required - return nil - } - - if err := m.FirstTimestamp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("firstTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("firstTimestamp") - } - return err - } - - return nil -} - -func (m *V1Event) contextValidateInvolvedObject(ctx context.Context, formats strfmt.Registry) error { - - if m.InvolvedObject != nil { - - if swag.IsZero(m.InvolvedObject) { // not required - return nil - } - - if err := m.InvolvedObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("involvedObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("involvedObject") - } - return err - } - } - - return nil -} - -func (m *V1Event) contextValidateLastTimestamp(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.LastTimestamp) { // not required - return nil - } - - if err := m.LastTimestamp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTimestamp") - } - return err - } - - return nil -} - -func (m *V1Event) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1Event) contextValidateRelated(ctx context.Context, formats strfmt.Registry) error { - - if m.Related != nil { - - if swag.IsZero(m.Related) { // not required - return nil - } - - if err := m.Related.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("related") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("related") - } - return err - } - } - - return nil -} - -func (m *V1Event) contextValidateSeries(ctx context.Context, formats strfmt.Registry) error { - - if m.Series != nil { - - if swag.IsZero(m.Series) { // not required - return nil - } - - if err := m.Series.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("series") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("series") - } - return err - } - } - - return nil -} - -func (m *V1Event) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1Event) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Event) UnmarshalBinary(b []byte) error { - var res V1Event - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_event_list.go b/pkg/argocd/models/v1_event_list.go deleted file mode 100644 index 0202057..0000000 --- a/pkg/argocd/models/v1_event_list.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1EventList EventList is a list of events. -// -// swagger:model v1EventList -type V1EventList struct { - - // List of events - Items []*V1Event `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1 event list -func (m *V1EventList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1EventList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1EventList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1 event list based on the context it is used -func (m *V1EventList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1EventList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1EventList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1EventList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1EventList) UnmarshalBinary(b []byte) error { - var res V1EventList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_event_series.go b/pkg/argocd/models/v1_event_series.go deleted file mode 100644 index 395111c..0000000 --- a/pkg/argocd/models/v1_event_series.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1EventSeries EventSeries contain information on series of events, i.e. thing that was/is happening -// continuously for some time. -// -// swagger:model v1EventSeries -type V1EventSeries struct { - - // Number of occurrences in this series up to the last heartbeat time - Count int32 `json:"count,omitempty"` - - // last observed time - LastObservedTime *V1MicroTime `json:"lastObservedTime,omitempty"` -} - -// Validate validates this v1 event series -func (m *V1EventSeries) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastObservedTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1EventSeries) validateLastObservedTime(formats strfmt.Registry) error { - if swag.IsZero(m.LastObservedTime) { // not required - return nil - } - - if m.LastObservedTime != nil { - if err := m.LastObservedTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastObservedTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastObservedTime") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1 event series based on the context it is used -func (m *V1EventSeries) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastObservedTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1EventSeries) contextValidateLastObservedTime(ctx context.Context, formats strfmt.Registry) error { - - if m.LastObservedTime != nil { - - if swag.IsZero(m.LastObservedTime) { // not required - return nil - } - - if err := m.LastObservedTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastObservedTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastObservedTime") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1EventSeries) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1EventSeries) UnmarshalBinary(b []byte) error { - var res V1EventSeries - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_event_source.go b/pkg/argocd/models/v1_event_source.go deleted file mode 100644 index fe847e9..0000000 --- a/pkg/argocd/models/v1_event_source.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1EventSource EventSource contains information for an event. -// -// swagger:model v1EventSource -type V1EventSource struct { - - // Component from which the event is generated. - // +optional - Component string `json:"component,omitempty"` - - // Node name on which the event is generated. - // +optional - Host string `json:"host,omitempty"` -} - -// Validate validates this v1 event source -func (m *V1EventSource) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 event source based on context it is used -func (m *V1EventSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1EventSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1EventSource) UnmarshalBinary(b []byte) error { - var res V1EventSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_fields_v1.go b/pkg/argocd/models/v1_fields_v1.go deleted file mode 100644 index 5ea94c7..0000000 --- a/pkg/argocd/models/v1_fields_v1.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1FieldsV1 FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. -// -// Each key is either a '.' representing the field itself, and will always map to an empty set, -// or a string representing a sub-field or item. The string will follow one of these four formats: -// 'f:', where is the name of a field in a struct, or key in a map -// 'v:', where is the exact json formatted value of a list item -// 'i:', where is position of a item in a list -// 'k:', where is a map of a list item's key fields to their unique values -// If a key maps to an empty Fields value, the field that key represents is part of the set. -// -// The exact format is defined in sigs.k8s.io/structured-merge-diff -// +protobuf.options.(gogoproto.goproto_stringer)=false -// -// swagger:model v1FieldsV1 -type V1FieldsV1 struct { - - // Raw is the underlying serialization of this object. - // Format: byte - Raw strfmt.Base64 `json:"Raw,omitempty"` -} - -// Validate validates this v1 fields v1 -func (m *V1FieldsV1) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 fields v1 based on context it is used -func (m *V1FieldsV1) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1FieldsV1) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1FieldsV1) UnmarshalBinary(b []byte) error { - var res V1FieldsV1 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_group_kind.go b/pkg/argocd/models/v1_group_kind.go deleted file mode 100644 index 723b63e..0000000 --- a/pkg/argocd/models/v1_group_kind.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1GroupKind GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying -// concepts during lookup stages without having partially valid types -// -// +protobuf.options.(gogoproto.goproto_stringer)=false -// -// swagger:model v1GroupKind -type V1GroupKind struct { - - // group - Group string `json:"group,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` -} - -// Validate validates this v1 group kind -func (m *V1GroupKind) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 group kind based on context it is used -func (m *V1GroupKind) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1GroupKind) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1GroupKind) UnmarshalBinary(b []byte) error { - var res V1GroupKind - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_json.go b/pkg/argocd/models/v1_json.go deleted file mode 100644 index 7aa488b..0000000 --- a/pkg/argocd/models/v1_json.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1JSON JSON represents any valid JSON value. -// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. -// -// swagger:model v1JSON -type V1JSON struct { - - // raw - // Format: byte - Raw strfmt.Base64 `json:"raw,omitempty"` -} - -// Validate validates this v1 JSON -func (m *V1JSON) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 JSON based on context it is used -func (m *V1JSON) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1JSON) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1JSON) UnmarshalBinary(b []byte) error { - var res V1JSON - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_label_selector.go b/pkg/argocd/models/v1_label_selector.go deleted file mode 100644 index ada711b..0000000 --- a/pkg/argocd/models/v1_label_selector.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1LabelSelector A label selector is a label query over a set of resources. The result of matchLabels and -// matchExpressions are ANDed. An empty label selector matches all objects. A null -// label selector matches no objects. -// +structType=atomic -// -// swagger:model v1LabelSelector -type V1LabelSelector struct { - - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - // +optional - MatchExpressions []*V1LabelSelectorRequirement `json:"matchExpressions"` - - // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - // map is equivalent to an element of matchExpressions, whose key field is "key", the - // operator is "In", and the values array contains only "value". The requirements are ANDed. - // +optional - MatchLabels map[string]string `json:"matchLabels,omitempty"` -} - -// Validate validates this v1 label selector -func (m *V1LabelSelector) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMatchExpressions(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1LabelSelector) validateMatchExpressions(formats strfmt.Registry) error { - if swag.IsZero(m.MatchExpressions) { // not required - return nil - } - - for i := 0; i < len(m.MatchExpressions); i++ { - if swag.IsZero(m.MatchExpressions[i]) { // not required - continue - } - - if m.MatchExpressions[i] != nil { - if err := m.MatchExpressions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1 label selector based on the context it is used -func (m *V1LabelSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMatchExpressions(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1LabelSelector) contextValidateMatchExpressions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MatchExpressions); i++ { - - if m.MatchExpressions[i] != nil { - - if swag.IsZero(m.MatchExpressions[i]) { // not required - return nil - } - - if err := m.MatchExpressions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1LabelSelector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1LabelSelector) UnmarshalBinary(b []byte) error { - var res V1LabelSelector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_label_selector_requirement.go b/pkg/argocd/models/v1_label_selector_requirement.go deleted file mode 100644 index ea047f2..0000000 --- a/pkg/argocd/models/v1_label_selector_requirement.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1LabelSelectorRequirement A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -// -// swagger:model v1LabelSelectorRequirement -type V1LabelSelectorRequirement struct { - - // key is the label key that the selector applies to. - Key string `json:"key,omitempty"` - - // operator represents a key's relationship to a set of values. - // Valid operators are In, NotIn, Exists and DoesNotExist. - Operator string `json:"operator,omitempty"` - - // values is an array of string values. If the operator is In or NotIn, - // the values array must be non-empty. If the operator is Exists or DoesNotExist, - // the values array must be empty. This array is replaced during a strategic - // merge patch. - // +optional - Values []string `json:"values"` -} - -// Validate validates this v1 label selector requirement -func (m *V1LabelSelectorRequirement) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 label selector requirement based on context it is used -func (m *V1LabelSelectorRequirement) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1LabelSelectorRequirement) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1LabelSelectorRequirement) UnmarshalBinary(b []byte) error { - var res V1LabelSelectorRequirement - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_list_meta.go b/pkg/argocd/models/v1_list_meta.go deleted file mode 100644 index 865087c..0000000 --- a/pkg/argocd/models/v1_list_meta.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1ListMeta ListMeta describes metadata that synthetic resources must have, including lists and -// various status objects. A resource may have only one of {ObjectMeta, ListMeta}. -// -// swagger:model v1ListMeta -type V1ListMeta struct { - - // continue may be set if the user set a limit on the number of items returned, and indicates that - // the server has more data available. The value is opaque and may be used to issue another request - // to the endpoint that served this list to retrieve the next set of available objects. Continuing a - // consistent list may not be possible if the server configuration has changed or more than a few - // minutes have passed. The resourceVersion field returned when using this continue value will be - // identical to the value in the first response, unless you have received this token from an error - // message. - Continue string `json:"continue,omitempty"` - - // remainingItemCount is the number of subsequent items in the list which are not included in this - // list response. If the list request contained label or field selectors, then the number of - // remaining items is unknown and the field will be left unset and omitted during serialization. - // If the list is complete (either because it is not chunking or because this is the last chunk), - // then there are no more remaining items and this field will be left unset and omitted during - // serialization. - // Servers older than v1.15 do not set this field. - // The intended use of the remainingItemCount is *estimating* the size of a collection. Clients - // should not rely on the remainingItemCount to be set or to be exact. - // +optional - RemainingItemCount int64 `json:"remainingItemCount,omitempty"` - - // String that identifies the server's internal version of this object that - // can be used by clients to determine when objects have changed. - // Value must be treated as opaque by clients and passed unmodified back to the server. - // Populated by the system. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty"` - - // Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. - // +optional - SelfLink string `json:"selfLink,omitempty"` -} - -// Validate validates this v1 list meta -func (m *V1ListMeta) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 list meta based on context it is used -func (m *V1ListMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1ListMeta) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1ListMeta) UnmarshalBinary(b []byte) error { - var res V1ListMeta - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_load_balancer_ingress.go b/pkg/argocd/models/v1_load_balancer_ingress.go deleted file mode 100644 index d5de60c..0000000 --- a/pkg/argocd/models/v1_load_balancer_ingress.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1LoadBalancerIngress LoadBalancerIngress represents the status of a load-balancer ingress point: -// traffic intended for the service should be sent to an ingress point. -// -// swagger:model v1LoadBalancerIngress -type V1LoadBalancerIngress struct { - - // Hostname is set for load-balancer ingress points that are DNS based - // (typically AWS load-balancers) - // +optional - Hostname string `json:"hostname,omitempty"` - - // IP is set for load-balancer ingress points that are IP based - // (typically GCE or OpenStack load-balancers) - // +optional - IP string `json:"ip,omitempty"` - - // IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. - // Setting this to "VIP" indicates that traffic is delivered to the node with - // the destination set to the load-balancer's IP and port. - // Setting this to "Proxy" indicates that traffic is delivered to the node or pod with - // the destination set to the node's IP and node port or the pod's IP and port. - // Service implementations may use this information to adjust traffic routing. - // +optional - IPMode string `json:"ipMode,omitempty"` - - // Ports is a list of records of service ports - // If used, every port defined in the service should have an entry in it - // +listType=atomic - // +optional - Ports []*V1PortStatus `json:"ports"` -} - -// Validate validates this v1 load balancer ingress -func (m *V1LoadBalancerIngress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePorts(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1LoadBalancerIngress) validatePorts(formats strfmt.Registry) error { - if swag.IsZero(m.Ports) { // not required - return nil - } - - for i := 0; i < len(m.Ports); i++ { - if swag.IsZero(m.Ports[i]) { // not required - continue - } - - if m.Ports[i] != nil { - if err := m.Ports[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ports" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1 load balancer ingress based on the context it is used -func (m *V1LoadBalancerIngress) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePorts(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1LoadBalancerIngress) contextValidatePorts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Ports); i++ { - - if m.Ports[i] != nil { - - if swag.IsZero(m.Ports[i]) { // not required - return nil - } - - if err := m.Ports[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ports" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ports" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1LoadBalancerIngress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1LoadBalancerIngress) UnmarshalBinary(b []byte) error { - var res V1LoadBalancerIngress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_managed_fields_entry.go b/pkg/argocd/models/v1_managed_fields_entry.go deleted file mode 100644 index 37071f3..0000000 --- a/pkg/argocd/models/v1_managed_fields_entry.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1ManagedFieldsEntry ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource -// that the fieldset applies to. -// -// swagger:model v1ManagedFieldsEntry -type V1ManagedFieldsEntry struct { - - // APIVersion defines the version of this resource that this field set - // applies to. The format is "group/version" just like the top-level - // APIVersion field. It is necessary to track the version of a field - // set because it cannot be automatically converted. - APIVersion string `json:"apiVersion,omitempty"` - - // FieldsType is the discriminator for the different fields format and version. - // There is currently only one possible value: "FieldsV1" - FieldsType string `json:"fieldsType,omitempty"` - - // fields v1 - FieldsV1 *V1FieldsV1 `json:"fieldsV1,omitempty"` - - // Manager is an identifier of the workflow managing these fields. - Manager string `json:"manager,omitempty"` - - // Operation is the type of operation which lead to this ManagedFieldsEntry being created. - // The only valid values for this field are 'Apply' and 'Update'. - Operation string `json:"operation,omitempty"` - - // Subresource is the name of the subresource used to update that object, or - // empty string if the object was updated through the main resource. The - // value of this field is used to distinguish between managers, even if they - // share the same name. For example, a status update will be distinct from a - // regular update using the same manager name. - // Note that the APIVersion field is not related to the Subresource field and - // it always corresponds to the version of the main resource. - Subresource string `json:"subresource,omitempty"` - - // time - // Format: date-time - Time V1Time `json:"time,omitempty"` -} - -// Validate validates this v1 managed fields entry -func (m *V1ManagedFieldsEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFieldsV1(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ManagedFieldsEntry) validateFieldsV1(formats strfmt.Registry) error { - if swag.IsZero(m.FieldsV1) { // not required - return nil - } - - if m.FieldsV1 != nil { - if err := m.FieldsV1.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldsV1") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldsV1") - } - return err - } - } - - return nil -} - -func (m *V1ManagedFieldsEntry) validateTime(formats strfmt.Registry) error { - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - - return nil -} - -// ContextValidate validate this v1 managed fields entry based on the context it is used -func (m *V1ManagedFieldsEntry) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFieldsV1(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ManagedFieldsEntry) contextValidateFieldsV1(ctx context.Context, formats strfmt.Registry) error { - - if m.FieldsV1 != nil { - - if swag.IsZero(m.FieldsV1) { // not required - return nil - } - - if err := m.FieldsV1.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fieldsV1") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fieldsV1") - } - return err - } - } - - return nil -} - -func (m *V1ManagedFieldsEntry) contextValidateTime(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.Time) { // not required - return nil - } - - if err := m.Time.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("time") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("time") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1ManagedFieldsEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1ManagedFieldsEntry) UnmarshalBinary(b []byte) error { - var res V1ManagedFieldsEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_micro_time.go b/pkg/argocd/models/v1_micro_time.go deleted file mode 100644 index aad614e..0000000 --- a/pkg/argocd/models/v1_micro_time.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1MicroTime MicroTime is version of Time with microsecond level precision. -// -// +protobuf.options.marshal=false -// +protobuf.as=Timestamp -// +protobuf.options.(gogoproto.goproto_stringer)=false -// -// swagger:model v1MicroTime -type V1MicroTime struct { - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. This field may be limited in precision depending on context. - Nanos int32 `json:"nanos,omitempty"` - - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - Seconds int64 `json:"seconds,omitempty"` -} - -// Validate validates this v1 micro time -func (m *V1MicroTime) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 micro time based on context it is used -func (m *V1MicroTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1MicroTime) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1MicroTime) UnmarshalBinary(b []byte) error { - var res V1MicroTime - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_node_system_info.go b/pkg/argocd/models/v1_node_system_info.go deleted file mode 100644 index f7ccd93..0000000 --- a/pkg/argocd/models/v1_node_system_info.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1NodeSystemInfo NodeSystemInfo is a set of ids/uuids to uniquely identify the node. -// -// swagger:model v1NodeSystemInfo -type V1NodeSystemInfo struct { - - // The Architecture reported by the node - Architecture string `json:"architecture,omitempty"` - - // Boot ID reported by the node. - BootID string `json:"bootID,omitempty"` - - // ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2). - ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty"` - - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - KernelVersion string `json:"kernelVersion,omitempty"` - - // KubeProxy Version reported by the node. - KubeProxyVersion string `json:"kubeProxyVersion,omitempty"` - - // Kubelet Version reported by the node. - KubeletVersion string `json:"kubeletVersion,omitempty"` - - // MachineID reported by the node. For unique machine identification - // in the cluster this field is preferred. Learn more from man(5) - // machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - MachineID string `json:"machineID,omitempty"` - - // The Operating System reported by the node - OperatingSystem string `json:"operatingSystem,omitempty"` - - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - OsImage string `json:"osImage,omitempty"` - - // SystemUUID reported by the node. For unique machine identification - // MachineID is preferred. This field is specific to Red Hat hosts - // https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid - SystemUUID string `json:"systemUUID,omitempty"` -} - -// Validate validates this v1 node system info -func (m *V1NodeSystemInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 node system info based on context it is used -func (m *V1NodeSystemInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1NodeSystemInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1NodeSystemInfo) UnmarshalBinary(b []byte) error { - var res V1NodeSystemInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_object_meta.go b/pkg/argocd/models/v1_object_meta.go deleted file mode 100644 index bb0d249..0000000 --- a/pkg/argocd/models/v1_object_meta.go +++ /dev/null @@ -1,397 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1ObjectMeta ObjectMeta is metadata that all persisted resources must have, which includes all objects -// users must create. -// -// swagger:model v1ObjectMeta -type V1ObjectMeta struct { - - // Annotations is an unstructured key value map stored with a resource that may be - // set by external tools to store and retrieve arbitrary metadata. They are not - // queryable and should be preserved when modifying objects. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // creation timestamp - // Format: date-time - CreationTimestamp V1Time `json:"creationTimestamp,omitempty"` - - // Number of seconds allowed for this object to gracefully terminate before - // it will be removed from the system. Only set when deletionTimestamp is also set. - // May only be shortened. - // Read-only. - // +optional - DeletionGracePeriodSeconds int64 `json:"deletionGracePeriodSeconds,omitempty"` - - // deletion timestamp - // Format: date-time - DeletionTimestamp V1Time `json:"deletionTimestamp,omitempty"` - - // Must be empty before the object is deleted from the registry. Each entry - // is an identifier for the responsible component that will remove the entry - // from the list. If the deletionTimestamp of the object is non-nil, entries - // in this list can only be removed. - // Finalizers may be processed and removed in any order. Order is NOT enforced - // because it introduces significant risk of stuck finalizers. - // finalizers is a shared field, any actor with permission can reorder it. - // If the finalizer list is processed in order, then this can lead to a situation - // in which the component responsible for the first finalizer in the list is - // waiting for a signal (field value, external system, or other) produced by a - // component responsible for a finalizer later in the list, resulting in a deadlock. - // Without enforced ordering finalizers are free to order amongst themselves and - // are not vulnerable to ordering changes in the list. - // +optional - // +patchStrategy=merge - Finalizers []string `json:"finalizers"` - - // GenerateName is an optional prefix, used by the server, to generate a unique - // name ONLY IF the Name field has not been provided. - // If this field is used, the name returned to the client will be different - // than the name passed. This value will also be combined with a unique suffix. - // The provided value has the same validation rules as the Name field, - // and may be truncated by the length of the suffix required to make the value - // unique on the server. - // - // If this field is specified and the generated name exists, the server will return a 409. - // - // Applied only if Name is not specified. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - // +optional - GenerateName string `json:"generateName,omitempty"` - - // A sequence number representing a specific generation of the desired state. - // Populated by the system. Read-only. - // +optional - Generation int64 `json:"generation,omitempty"` - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May match selectors of replication controllers - // and services. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - // +optional - Labels map[string]string `json:"labels,omitempty"` - - // ManagedFields maps workflow-id and version to the set of fields - // that are managed by that workflow. This is mostly for internal - // housekeeping, and users typically shouldn't need to set or - // understand this field. A workflow can be the user's name, a - // controller's name, or the name of a specific apply path like - // "ci-cd". The set of fields is always in the version that the - // workflow used when modifying the object. - // - // +optional - ManagedFields []*V1ManagedFieldsEntry `json:"managedFields"` - - // Name must be unique within a namespace. Is required when creating resources, although - // some resources may allow a client to request the generation of an appropriate name - // automatically. Name is primarily intended for creation idempotence and configuration - // definition. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - // +optional - Name string `json:"name,omitempty"` - - // Namespace defines the space within which each name must be unique. An empty namespace is - // equivalent to the "default" namespace, but "default" is the canonical representation. - // Not all objects are required to be scoped to a namespace - the value of this field for - // those objects will be empty. - // - // Must be a DNS_LABEL. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces - // +optional - Namespace string `json:"namespace,omitempty"` - - // List of objects depended by this object. If ALL objects in the list have - // been deleted, this object will be garbage collected. If this object is managed by a controller, - // then an entry in this list will point to this controller, with the controller field set to true. - // There cannot be more than one managing controller. - // +optional - // +patchMergeKey=uid - // +patchStrategy=merge - OwnerReferences []*V1OwnerReference `json:"ownerReferences"` - - // An opaque value that represents the internal version of this object that can - // be used by clients to determine when objects have changed. May be used for optimistic - // concurrency, change detection, and the watch operation on a resource or set of resources. - // Clients must treat these values as opaque and passed unmodified back to the server. - // They may only be valid for a particular resource or set of resources. - // - // Populated by the system. - // Read-only. - // Value must be treated as opaque by clients and . - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty"` - - // Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. - // +optional - SelfLink string `json:"selfLink,omitempty"` - - // UID is the unique in time and space value for this object. It is typically generated by - // the server on successful creation of a resource and is not allowed to change on PUT - // operations. - // - // Populated by the system. - // Read-only. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - // +optional - UID string `json:"uid,omitempty"` -} - -// Validate validates this v1 object meta -func (m *V1ObjectMeta) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCreationTimestamp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeletionTimestamp(formats); err != nil { - res = append(res, err) - } - - if err := m.validateManagedFields(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOwnerReferences(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ObjectMeta) validateCreationTimestamp(formats strfmt.Registry) error { - if swag.IsZero(m.CreationTimestamp) { // not required - return nil - } - - if err := m.CreationTimestamp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("creationTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("creationTimestamp") - } - return err - } - - return nil -} - -func (m *V1ObjectMeta) validateDeletionTimestamp(formats strfmt.Registry) error { - if swag.IsZero(m.DeletionTimestamp) { // not required - return nil - } - - if err := m.DeletionTimestamp.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deletionTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deletionTimestamp") - } - return err - } - - return nil -} - -func (m *V1ObjectMeta) validateManagedFields(formats strfmt.Registry) error { - if swag.IsZero(m.ManagedFields) { // not required - return nil - } - - for i := 0; i < len(m.ManagedFields); i++ { - if swag.IsZero(m.ManagedFields[i]) { // not required - continue - } - - if m.ManagedFields[i] != nil { - if err := m.ManagedFields[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managedFields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managedFields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1ObjectMeta) validateOwnerReferences(formats strfmt.Registry) error { - if swag.IsZero(m.OwnerReferences) { // not required - return nil - } - - for i := 0; i < len(m.OwnerReferences); i++ { - if swag.IsZero(m.OwnerReferences[i]) { // not required - continue - } - - if m.OwnerReferences[i] != nil { - if err := m.OwnerReferences[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1 object meta based on the context it is used -func (m *V1ObjectMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCreationTimestamp(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeletionTimestamp(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateManagedFields(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOwnerReferences(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1ObjectMeta) contextValidateCreationTimestamp(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.CreationTimestamp) { // not required - return nil - } - - if err := m.CreationTimestamp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("creationTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("creationTimestamp") - } - return err - } - - return nil -} - -func (m *V1ObjectMeta) contextValidateDeletionTimestamp(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.DeletionTimestamp) { // not required - return nil - } - - if err := m.DeletionTimestamp.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deletionTimestamp") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deletionTimestamp") - } - return err - } - - return nil -} - -func (m *V1ObjectMeta) contextValidateManagedFields(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ManagedFields); i++ { - - if m.ManagedFields[i] != nil { - - if swag.IsZero(m.ManagedFields[i]) { // not required - return nil - } - - if err := m.ManagedFields[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managedFields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managedFields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1ObjectMeta) contextValidateOwnerReferences(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OwnerReferences); i++ { - - if m.OwnerReferences[i] != nil { - - if swag.IsZero(m.OwnerReferences[i]) { // not required - return nil - } - - if err := m.OwnerReferences[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1ObjectMeta) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1ObjectMeta) UnmarshalBinary(b []byte) error { - var res V1ObjectMeta - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_object_reference.go b/pkg/argocd/models/v1_object_reference.go deleted file mode 100644 index 50166df..0000000 --- a/pkg/argocd/models/v1_object_reference.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1ObjectReference ObjectReference contains enough information to let you inspect or modify the referred object. -// --- -// New uses of this type are discouraged because of difficulty describing its usage when embedded in APIs. -// 1. Ignored fields. It includes many fields which are not generally honored. For instance, ResourceVersion and FieldPath are both very rarely valid in actual usage. -// 2. Invalid usage help. It is impossible to add specific help for individual usage. In most embedded usages, there are particular -// restrictions like, "must refer only to types A and B" or "UID not honored" or "name must be restricted". -// Those cannot be well described when embedded. -// 3. Inconsistent validation. Because the usages are different, the validation rules are different by usage, which makes it hard for users to predict what will happen. -// 4. The fields are both imprecise and overly precise. Kind is not a precise mapping to a URL. This can produce ambiguity -// during interpretation and require a REST mapping. In most cases, the dependency is on the group,resource tuple -// and the version of the actual struct is irrelevant. -// 5. We cannot easily change it. Because this type is embedded in many locations, updates to this type -// will affect numerous schemas. Don't make new APIs embed an underspecified API type they do not control. -// -// Instead of using this type, create a locally provided and used type that is well-focused on your reference. -// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +structType=atomic -// -// swagger:model v1ObjectReference -type V1ObjectReference struct { - - // API version of the referent. - // +optional - APIVersion string `json:"apiVersion,omitempty"` - - // If referring to a piece of an object instead of an entire object, this string - // should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. - // For example, if the object reference is to a container within a pod, this would take on a value like: - // "spec.containers{name}" (where "name" refers to the name of the container that triggered - // the event) or if no container name is specified "spec.containers[2]" (container with - // index 2 in this pod). This syntax is chosen only to have some well-defined way of - // referencing a part of an object. - // TODO: this design is not final and this field is subject to change in the future. - // +optional - FieldPath string `json:"fieldPath,omitempty"` - - // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - Kind string `json:"kind,omitempty"` - - // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +optional - Name string `json:"name,omitempty"` - - // Namespace of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - // +optional - Namespace string `json:"namespace,omitempty"` - - // Specific resourceVersion to which this reference is made, if any. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty"` - - // UID of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - // +optional - UID string `json:"uid,omitempty"` -} - -// Validate validates this v1 object reference -func (m *V1ObjectReference) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 object reference based on context it is used -func (m *V1ObjectReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1ObjectReference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1ObjectReference) UnmarshalBinary(b []byte) error { - var res V1ObjectReference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_owner_reference.go b/pkg/argocd/models/v1_owner_reference.go deleted file mode 100644 index 6d5bf41..0000000 --- a/pkg/argocd/models/v1_owner_reference.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1OwnerReference OwnerReference contains enough information to let you identify an owning -// object. An owning object must be in the same namespace as the dependent, or -// be cluster-scoped, so there is no namespace field. -// +structType=atomic -// -// swagger:model v1OwnerReference -type V1OwnerReference struct { - - // API version of the referent. - APIVersion string `json:"apiVersion,omitempty"` - - // If true, AND if the owner has the "foregroundDeletion" finalizer, then - // the owner cannot be deleted from the key-value store until this - // reference is removed. - // See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - // for how the garbage collector interacts with this field and enforces the foreground deletion. - // Defaults to false. - // To set this field, a user needs "delete" permission of the owner, - // otherwise 422 (Unprocessable Entity) will be returned. - // +optional - BlockOwnerDeletion bool `json:"blockOwnerDeletion,omitempty"` - - // If true, this reference points to the managing controller. - // +optional - Controller bool `json:"controller,omitempty"` - - // Kind of the referent. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - Kind string `json:"kind,omitempty"` - - // Name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - Name string `json:"name,omitempty"` - - // UID of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids - UID string `json:"uid,omitempty"` -} - -// Validate validates this v1 owner reference -func (m *V1OwnerReference) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 owner reference based on context it is used -func (m *V1OwnerReference) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1OwnerReference) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1OwnerReference) UnmarshalBinary(b []byte) error { - var res V1OwnerReference - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_port_status.go b/pkg/argocd/models/v1_port_status.go deleted file mode 100644 index ca5a916..0000000 --- a/pkg/argocd/models/v1_port_status.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1PortStatus v1 port status -// -// swagger:model v1PortStatus -type V1PortStatus struct { - - // Error is to record the problem with the service port - // The format of the error shall comply with the following rules: - // - built-in error values shall be specified in this file and those shall use - // CamelCase names - // - cloud provider specific error values must have names that comply with the - // format foo.example.com/CamelCase. - // --- - // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - // +optional - // +kubebuilder:validation:Required - // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` - // +kubebuilder:validation:MaxLength=316 - Error string `json:"error,omitempty"` - - // Port is the port number of the service port of which status is recorded here - Port int32 `json:"port,omitempty"` - - // Protocol is the protocol of the service port of which status is recorded here - // The supported values are: "TCP", "UDP", "SCTP" - Protocol string `json:"protocol,omitempty"` -} - -// Validate validates this v1 port status -func (m *V1PortStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1 port status based on context it is used -func (m *V1PortStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1PortStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1PortStatus) UnmarshalBinary(b []byte) error { - var res V1PortStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1_time.go b/pkg/argocd/models/v1_time.go deleted file mode 100644 index fb9dd3c..0000000 --- a/pkg/argocd/models/v1_time.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// V1Time Time is a wrapper around time.Time which supports correct -// marshaling to YAML and JSON. Wrappers are provided for many -// of the factory methods that the time package offers. -// -// +protobuf.options.marshal=false -// +protobuf.as=Timestamp -// +protobuf.options.(gogoproto.goproto_stringer)=false -// -// swagger:model v1Time -type V1Time strfmt.DateTime - -// UnmarshalJSON sets a V1Time value from JSON input -func (m *V1Time) UnmarshalJSON(b []byte) error { - return ((*strfmt.DateTime)(m)).UnmarshalJSON(b) -} - -// MarshalJSON retrieves a V1Time value as JSON output -func (m V1Time) MarshalJSON() ([]byte, error) { - return (strfmt.DateTime(m)).MarshalJSON() -} - -// Validate validates this v1 time -func (m V1Time) Validate(formats strfmt.Registry) error { - var res []error - - if err := validate.FormatOf("", "body", "date-time", strfmt.DateTime(m).String(), formats); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ContextValidate validates this v1 time based on context it is used -func (m V1Time) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1Time) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1Time) UnmarshalBinary(b []byte) error { - var res V1Time - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_a_w_s_auth_config.go b/pkg/argocd/models/v1alpha1_a_w_s_auth_config.go deleted file mode 100644 index 59204c9..0000000 --- a/pkg/argocd/models/v1alpha1_a_w_s_auth_config.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1AWSAuthConfig AWSAuthConfig is an AWS IAM authentication configuration -// -// swagger:model v1alpha1AWSAuthConfig -type V1alpha1AWSAuthConfig struct { - - // ClusterName contains AWS cluster name - ClusterName string `json:"clusterName,omitempty"` - - // Profile contains optional role ARN. If set then AWS IAM Authenticator uses the profile to perform cluster operations instead of the default AWS credential provider chain. - Profile string `json:"profile,omitempty"` - - // RoleARN contains optional role ARN. If set then AWS IAM Authenticator assume a role to perform cluster operations instead of the default AWS credential provider chain. - RoleARN string `json:"roleARN,omitempty"` -} - -// Validate validates this v1alpha1 a w s auth config -func (m *V1alpha1AWSAuthConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 a w s auth config based on context it is used -func (m *V1alpha1AWSAuthConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1AWSAuthConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1AWSAuthConfig) UnmarshalBinary(b []byte) error { - var res V1alpha1AWSAuthConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_app_project.go b/pkg/argocd/models/v1alpha1_app_project.go deleted file mode 100644 index 3b56aa7..0000000 --- a/pkg/argocd/models/v1alpha1_app_project.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1AppProject AppProject provides a logical grouping of applications, providing controls for: -// * where the apps may deploy to (cluster whitelist) -// * what may be deployed (repository whitelist, resource whitelist/blacklist) -// * who can access these applications (roles, OIDC group claims bindings) -// * and what they can do (RBAC policies) -// * automation access to these roles (JWT tokens) -// +genclient -// +genclient:noStatus -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:path=appprojects,shortName=appproj;appprojs -// -// swagger:model v1alpha1AppProject -type V1alpha1AppProject struct { - - // metadata - Metadata *V1ObjectMeta `json:"metadata,omitempty"` - - // spec - Spec *V1alpha1AppProjectSpec `json:"spec,omitempty"` - - // status - Status *V1alpha1AppProjectStatus `json:"status,omitempty"` -} - -// Validate validates this v1alpha1 app project -func (m *V1alpha1AppProject) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProject) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1AppProject) validateSpec(formats strfmt.Registry) error { - if swag.IsZero(m.Spec) { // not required - return nil - } - - if m.Spec != nil { - if err := m.Spec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *V1alpha1AppProject) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 app project based on the context it is used -func (m *V1alpha1AppProject) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProject) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1AppProject) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.Spec != nil { - - if swag.IsZero(m.Spec) { // not required - return nil - } - - if err := m.Spec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *V1alpha1AppProject) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1AppProject) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1AppProject) UnmarshalBinary(b []byte) error { - var res V1alpha1AppProject - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_app_project_list.go b/pkg/argocd/models/v1alpha1_app_project_list.go deleted file mode 100644 index 281ccaf..0000000 --- a/pkg/argocd/models/v1alpha1_app_project_list.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1AppProjectList AppProjectList is list of AppProject resources -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// swagger:model v1alpha1AppProjectList -type V1alpha1AppProjectList struct { - - // items - Items []*V1alpha1AppProject `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 app project list -func (m *V1alpha1AppProjectList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProjectList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 app project list based on the context it is used -func (m *V1alpha1AppProjectList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProjectList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1AppProjectList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1AppProjectList) UnmarshalBinary(b []byte) error { - var res V1alpha1AppProjectList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_app_project_spec.go b/pkg/argocd/models/v1alpha1_app_project_spec.go deleted file mode 100644 index 82a5c57..0000000 --- a/pkg/argocd/models/v1alpha1_app_project_spec.go +++ /dev/null @@ -1,618 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1AppProjectSpec AppProjectSpec is the specification of an AppProject -// -// swagger:model v1alpha1AppProjectSpec -type V1alpha1AppProjectSpec struct { - - // ClusterResourceBlacklist contains list of blacklisted cluster level resources - ClusterResourceBlacklist []*V1GroupKind `json:"clusterResourceBlacklist"` - - // ClusterResourceWhitelist contains list of whitelisted cluster level resources - ClusterResourceWhitelist []*V1GroupKind `json:"clusterResourceWhitelist"` - - // Description contains optional project description - Description string `json:"description,omitempty"` - - // Destinations contains list of destinations available for deployment - Destinations []*V1alpha1ApplicationDestination `json:"destinations"` - - // NamespaceResourceBlacklist contains list of blacklisted namespace level resources - NamespaceResourceBlacklist []*V1GroupKind `json:"namespaceResourceBlacklist"` - - // NamespaceResourceWhitelist contains list of whitelisted namespace level resources - NamespaceResourceWhitelist []*V1GroupKind `json:"namespaceResourceWhitelist"` - - // orphaned resources - OrphanedResources *V1alpha1OrphanedResourcesMonitorSettings `json:"orphanedResources,omitempty"` - - // PermitOnlyProjectScopedClusters determines whether destinations can only reference clusters which are project-scoped - PermitOnlyProjectScopedClusters bool `json:"permitOnlyProjectScopedClusters,omitempty"` - - // Roles are user defined RBAC roles associated with this project - Roles []*V1alpha1ProjectRole `json:"roles"` - - // SignatureKeys contains a list of PGP key IDs that commits in Git must be signed with in order to be allowed for sync - SignatureKeys []*V1alpha1SignatureKey `json:"signatureKeys"` - - // SourceNamespaces defines the namespaces application resources are allowed to be created in - SourceNamespaces []string `json:"sourceNamespaces"` - - // SourceRepos contains list of repository URLs which can be used for deployment - SourceRepos []string `json:"sourceRepos"` - - // SyncWindows controls when syncs can be run for apps in this project - SyncWindows []*V1alpha1SyncWindow `json:"syncWindows"` -} - -// Validate validates this v1alpha1 app project spec -func (m *V1alpha1AppProjectSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterResourceBlacklist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusterResourceWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDestinations(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNamespaceResourceBlacklist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNamespaceResourceWhitelist(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrphanedResources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRoles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSignatureKeys(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyncWindows(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProjectSpec) validateClusterResourceBlacklist(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterResourceBlacklist) { // not required - return nil - } - - for i := 0; i < len(m.ClusterResourceBlacklist); i++ { - if swag.IsZero(m.ClusterResourceBlacklist[i]) { // not required - continue - } - - if m.ClusterResourceBlacklist[i] != nil { - if err := m.ClusterResourceBlacklist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterResourceBlacklist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterResourceBlacklist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateClusterResourceWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterResourceWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.ClusterResourceWhitelist); i++ { - if swag.IsZero(m.ClusterResourceWhitelist[i]) { // not required - continue - } - - if m.ClusterResourceWhitelist[i] != nil { - if err := m.ClusterResourceWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterResourceWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterResourceWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateDestinations(formats strfmt.Registry) error { - if swag.IsZero(m.Destinations) { // not required - return nil - } - - for i := 0; i < len(m.Destinations); i++ { - if swag.IsZero(m.Destinations[i]) { // not required - continue - } - - if m.Destinations[i] != nil { - if err := m.Destinations[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destinations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destinations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateNamespaceResourceBlacklist(formats strfmt.Registry) error { - if swag.IsZero(m.NamespaceResourceBlacklist) { // not required - return nil - } - - for i := 0; i < len(m.NamespaceResourceBlacklist); i++ { - if swag.IsZero(m.NamespaceResourceBlacklist[i]) { // not required - continue - } - - if m.NamespaceResourceBlacklist[i] != nil { - if err := m.NamespaceResourceBlacklist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("namespaceResourceBlacklist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("namespaceResourceBlacklist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateNamespaceResourceWhitelist(formats strfmt.Registry) error { - if swag.IsZero(m.NamespaceResourceWhitelist) { // not required - return nil - } - - for i := 0; i < len(m.NamespaceResourceWhitelist); i++ { - if swag.IsZero(m.NamespaceResourceWhitelist[i]) { // not required - continue - } - - if m.NamespaceResourceWhitelist[i] != nil { - if err := m.NamespaceResourceWhitelist[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("namespaceResourceWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("namespaceResourceWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateOrphanedResources(formats strfmt.Registry) error { - if swag.IsZero(m.OrphanedResources) { // not required - return nil - } - - if m.OrphanedResources != nil { - if err := m.OrphanedResources.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orphanedResources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orphanedResources") - } - return err - } - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateRoles(formats strfmt.Registry) error { - if swag.IsZero(m.Roles) { // not required - return nil - } - - for i := 0; i < len(m.Roles); i++ { - if swag.IsZero(m.Roles[i]) { // not required - continue - } - - if m.Roles[i] != nil { - if err := m.Roles[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("roles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("roles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateSignatureKeys(formats strfmt.Registry) error { - if swag.IsZero(m.SignatureKeys) { // not required - return nil - } - - for i := 0; i < len(m.SignatureKeys); i++ { - if swag.IsZero(m.SignatureKeys[i]) { // not required - continue - } - - if m.SignatureKeys[i] != nil { - if err := m.SignatureKeys[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signatureKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("signatureKeys" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) validateSyncWindows(formats strfmt.Registry) error { - if swag.IsZero(m.SyncWindows) { // not required - return nil - } - - for i := 0; i < len(m.SyncWindows); i++ { - if swag.IsZero(m.SyncWindows[i]) { // not required - continue - } - - if m.SyncWindows[i] != nil { - if err := m.SyncWindows[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 app project spec based on the context it is used -func (m *V1alpha1AppProjectSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterResourceBlacklist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusterResourceWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDestinations(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNamespaceResourceBlacklist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNamespaceResourceWhitelist(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrphanedResources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRoles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSignatureKeys(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyncWindows(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateClusterResourceBlacklist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterResourceBlacklist); i++ { - - if m.ClusterResourceBlacklist[i] != nil { - - if swag.IsZero(m.ClusterResourceBlacklist[i]) { // not required - return nil - } - - if err := m.ClusterResourceBlacklist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterResourceBlacklist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterResourceBlacklist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateClusterResourceWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ClusterResourceWhitelist); i++ { - - if m.ClusterResourceWhitelist[i] != nil { - - if swag.IsZero(m.ClusterResourceWhitelist[i]) { // not required - return nil - } - - if err := m.ClusterResourceWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterResourceWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterResourceWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateDestinations(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Destinations); i++ { - - if m.Destinations[i] != nil { - - if swag.IsZero(m.Destinations[i]) { // not required - return nil - } - - if err := m.Destinations[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destinations" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destinations" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateNamespaceResourceBlacklist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NamespaceResourceBlacklist); i++ { - - if m.NamespaceResourceBlacklist[i] != nil { - - if swag.IsZero(m.NamespaceResourceBlacklist[i]) { // not required - return nil - } - - if err := m.NamespaceResourceBlacklist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("namespaceResourceBlacklist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("namespaceResourceBlacklist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateNamespaceResourceWhitelist(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.NamespaceResourceWhitelist); i++ { - - if m.NamespaceResourceWhitelist[i] != nil { - - if swag.IsZero(m.NamespaceResourceWhitelist[i]) { // not required - return nil - } - - if err := m.NamespaceResourceWhitelist[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("namespaceResourceWhitelist" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("namespaceResourceWhitelist" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateOrphanedResources(ctx context.Context, formats strfmt.Registry) error { - - if m.OrphanedResources != nil { - - if swag.IsZero(m.OrphanedResources) { // not required - return nil - } - - if err := m.OrphanedResources.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orphanedResources") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orphanedResources") - } - return err - } - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Roles); i++ { - - if m.Roles[i] != nil { - - if swag.IsZero(m.Roles[i]) { // not required - return nil - } - - if err := m.Roles[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("roles" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("roles" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateSignatureKeys(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SignatureKeys); i++ { - - if m.SignatureKeys[i] != nil { - - if swag.IsZero(m.SignatureKeys[i]) { // not required - return nil - } - - if err := m.SignatureKeys[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("signatureKeys" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("signatureKeys" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1AppProjectSpec) contextValidateSyncWindows(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.SyncWindows); i++ { - - if m.SyncWindows[i] != nil { - - if swag.IsZero(m.SyncWindows[i]) { // not required - return nil - } - - if err := m.SyncWindows[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncWindows" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncWindows" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1AppProjectSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1AppProjectSpec) UnmarshalBinary(b []byte) error { - var res V1alpha1AppProjectSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_app_project_status.go b/pkg/argocd/models/v1alpha1_app_project_status.go deleted file mode 100644 index b4a3170..0000000 --- a/pkg/argocd/models/v1alpha1_app_project_status.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// V1alpha1AppProjectStatus AppProjectStatus contains status information for AppProject CRs -// -// swagger:model v1alpha1AppProjectStatus -type V1alpha1AppProjectStatus struct { - - // JWTTokensByRole contains a list of JWT tokens issued for a given role - JwtTokensByRole map[string]V1alpha1JWTTokens `json:"jwtTokensByRole,omitempty"` -} - -// Validate validates this v1alpha1 app project status -func (m *V1alpha1AppProjectStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJwtTokensByRole(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProjectStatus) validateJwtTokensByRole(formats strfmt.Registry) error { - if swag.IsZero(m.JwtTokensByRole) { // not required - return nil - } - - for k := range m.JwtTokensByRole { - - if err := validate.Required("jwtTokensByRole"+"."+k, "body", m.JwtTokensByRole[k]); err != nil { - return err - } - if val, ok := m.JwtTokensByRole[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jwtTokensByRole" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jwtTokensByRole" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 app project status based on the context it is used -func (m *V1alpha1AppProjectStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJwtTokensByRole(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1AppProjectStatus) contextValidateJwtTokensByRole(ctx context.Context, formats strfmt.Registry) error { - - for k := range m.JwtTokensByRole { - - if val, ok := m.JwtTokensByRole[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1AppProjectStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1AppProjectStatus) UnmarshalBinary(b []byte) error { - var res V1alpha1AppProjectStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application.go b/pkg/argocd/models/v1alpha1_application.go deleted file mode 100644 index 85aaa4e..0000000 --- a/pkg/argocd/models/v1alpha1_application.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1Application Application is a definition of Application resource. -// +genclient -// +genclient:noStatus -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:path=applications,shortName=app;apps -// +kubebuilder:printcolumn:name="Sync Status",type=string,JSONPath=`.status.sync.status` -// +kubebuilder:printcolumn:name="Health Status",type=string,JSONPath=`.status.health.status` -// +kubebuilder:printcolumn:name="Revision",type=string,JSONPath=`.status.sync.revision`,priority=10 -// +kubebuilder:printcolumn:name="Project",type=string,JSONPath=`.spec.project`,priority=10 -// -// swagger:model v1alpha1Application -type V1alpha1Application struct { - - // metadata - Metadata *V1ObjectMeta `json:"metadata,omitempty"` - - // operation - Operation *V1alpha1Operation `json:"operation,omitempty"` - - // spec - Spec *V1alpha1ApplicationSpec `json:"spec,omitempty"` - - // status - Status *V1alpha1ApplicationStatus `json:"status,omitempty"` -} - -// Validate validates this v1alpha1 application -func (m *V1alpha1Application) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Application) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Application) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(m.Operation) { // not required - return nil - } - - if m.Operation != nil { - if err := m.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Application) validateSpec(formats strfmt.Registry) error { - if swag.IsZero(m.Spec) { // not required - return nil - } - - if m.Spec != nil { - if err := m.Spec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Application) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application based on the context it is used -func (m *V1alpha1Application) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOperation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Application) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Application) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { - - if m.Operation != nil { - - if swag.IsZero(m.Operation) { // not required - return nil - } - - if err := m.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Application) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.Spec != nil { - - if swag.IsZero(m.Spec) { // not required - return nil - } - - if err := m.Spec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Application) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1Application) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1Application) UnmarshalBinary(b []byte) error { - var res V1alpha1Application - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_condition.go b/pkg/argocd/models/v1alpha1_application_condition.go deleted file mode 100644 index d7a3bc5..0000000 --- a/pkg/argocd/models/v1alpha1_application_condition.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationCondition ApplicationCondition contains details about an application condition, which is usually an error or warning -// -// swagger:model v1alpha1ApplicationCondition -type V1alpha1ApplicationCondition struct { - - // last transition time - // Format: date-time - LastTransitionTime V1Time `json:"lastTransitionTime,omitempty"` - - // Message contains human-readable message indicating details about condition - Message string `json:"message,omitempty"` - - // Type is an application condition type - Type string `json:"type,omitempty"` -} - -// Validate validates this v1alpha1 application condition -func (m *V1alpha1ApplicationCondition) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastTransitionTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationCondition) validateLastTransitionTime(formats strfmt.Registry) error { - if swag.IsZero(m.LastTransitionTime) { // not required - return nil - } - - if err := m.LastTransitionTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTransitionTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTransitionTime") - } - return err - } - - return nil -} - -// ContextValidate validate this v1alpha1 application condition based on the context it is used -func (m *V1alpha1ApplicationCondition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastTransitionTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationCondition) contextValidateLastTransitionTime(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.LastTransitionTime) { // not required - return nil - } - - if err := m.LastTransitionTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTransitionTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTransitionTime") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationCondition) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationCondition) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationCondition - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_destination.go b/pkg/argocd/models/v1alpha1_application_destination.go deleted file mode 100644 index 8a91902..0000000 --- a/pkg/argocd/models/v1alpha1_application_destination.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationDestination ApplicationDestination holds information about the application's destination -// -// swagger:model v1alpha1ApplicationDestination -type V1alpha1ApplicationDestination struct { - - // Name is an alternate way of specifying the target cluster by its symbolic name. This must be set if Server is not set. - Name string `json:"name,omitempty"` - - // Namespace specifies the target namespace for the application's resources. - // The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace - Namespace string `json:"namespace,omitempty"` - - // Server specifies the URL of the target cluster's Kubernetes control plane API. This must be set if Name is not set. - Server string `json:"server,omitempty"` -} - -// Validate validates this v1alpha1 application destination -func (m *V1alpha1ApplicationDestination) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application destination based on context it is used -func (m *V1alpha1ApplicationDestination) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationDestination) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationDestination) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationDestination - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_list.go b/pkg/argocd/models/v1alpha1_application_list.go deleted file mode 100644 index 7a21c7b..0000000 --- a/pkg/argocd/models/v1alpha1_application_list.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationList ApplicationList is list of Application resources -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// swagger:model v1alpha1ApplicationList -type V1alpha1ApplicationList struct { - - // items - Items []*V1alpha1Application `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 application list -func (m *V1alpha1ApplicationList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application list based on the context it is used -func (m *V1alpha1ApplicationList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationList) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_match_expression.go b/pkg/argocd/models/v1alpha1_application_match_expression.go deleted file mode 100644 index 55ddde4..0000000 --- a/pkg/argocd/models/v1alpha1_application_match_expression.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationMatchExpression v1alpha1 application match expression -// -// swagger:model v1alpha1ApplicationMatchExpression -type V1alpha1ApplicationMatchExpression struct { - - // key - Key string `json:"key,omitempty"` - - // operator - Operator string `json:"operator,omitempty"` - - // values - Values []string `json:"values"` -} - -// Validate validates this v1alpha1 application match expression -func (m *V1alpha1ApplicationMatchExpression) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application match expression based on context it is used -func (m *V1alpha1ApplicationMatchExpression) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationMatchExpression) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationMatchExpression) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationMatchExpression - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_preserved_fields.go b/pkg/argocd/models/v1alpha1_application_preserved_fields.go deleted file mode 100644 index 0a8c1bb..0000000 --- a/pkg/argocd/models/v1alpha1_application_preserved_fields.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationPreservedFields v1alpha1 application preserved fields -// -// swagger:model v1alpha1ApplicationPreservedFields -type V1alpha1ApplicationPreservedFields struct { - - // annotations - Annotations []string `json:"annotations"` - - // labels - Labels []string `json:"labels"` -} - -// Validate validates this v1alpha1 application preserved fields -func (m *V1alpha1ApplicationPreservedFields) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application preserved fields based on context it is used -func (m *V1alpha1ApplicationPreservedFields) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationPreservedFields) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationPreservedFields) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationPreservedFields - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set.go b/pkg/argocd/models/v1alpha1_application_set.go deleted file mode 100644 index ebf9d12..0000000 --- a/pkg/argocd/models/v1alpha1_application_set.go +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSet ApplicationSet is a set of Application resources -// +genclient -// +genclient:noStatus -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:path=applicationsets,shortName=appset;appsets -// +kubebuilder:subresource:status -// -// swagger:model v1alpha1ApplicationSet -type V1alpha1ApplicationSet struct { - - // metadata - Metadata *V1ObjectMeta `json:"metadata,omitempty"` - - // spec - Spec *V1alpha1ApplicationSetSpec `json:"spec,omitempty"` - - // status - Status *V1alpha1ApplicationSetStatus `json:"status,omitempty"` -} - -// Validate validates this v1alpha1 application set -func (m *V1alpha1ApplicationSet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpec(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSet) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSet) validateSpec(formats strfmt.Registry) error { - if swag.IsZero(m.Spec) { // not required - return nil - } - - if m.Spec != nil { - if err := m.Spec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSet) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(m.Status) { // not required - return nil - } - - if m.Status != nil { - if err := m.Status.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set based on the context it is used -func (m *V1alpha1ApplicationSet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSet) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSet) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.Spec != nil { - - if swag.IsZero(m.Spec) { // not required - return nil - } - - if err := m.Spec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSet) contextValidateStatus(ctx context.Context, formats strfmt.Registry) error { - - if m.Status != nil { - - if swag.IsZero(m.Status) { // not required - return nil - } - - if err := m.Status.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("status") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("status") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSet) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_application_status.go b/pkg/argocd/models/v1alpha1_application_set_application_status.go deleted file mode 100644 index cb00c80..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_application_status.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetApplicationStatus ApplicationSetApplicationStatus contains details about each Application managed by the ApplicationSet -// -// swagger:model v1alpha1ApplicationSetApplicationStatus -type V1alpha1ApplicationSetApplicationStatus struct { - - // Application contains the name of the Application resource - Application string `json:"application,omitempty"` - - // last transition time - // Format: date-time - LastTransitionTime V1Time `json:"lastTransitionTime,omitempty"` - - // Message contains human-readable message indicating details about the status - Message string `json:"message,omitempty"` - - // Status contains the AppSet's perceived status of the managed Application resource: (Waiting, Pending, Progressing, Healthy) - Status string `json:"status,omitempty"` - - // Step tracks which step this Application should be updated in - Step string `json:"step,omitempty"` - - // TargetRevision tracks the desired revisions the Application should be synced to. - Targetrevisions []string `json:"targetrevisions"` -} - -// Validate validates this v1alpha1 application set application status -func (m *V1alpha1ApplicationSetApplicationStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastTransitionTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetApplicationStatus) validateLastTransitionTime(formats strfmt.Registry) error { - if swag.IsZero(m.LastTransitionTime) { // not required - return nil - } - - if err := m.LastTransitionTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTransitionTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTransitionTime") - } - return err - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set application status based on the context it is used -func (m *V1alpha1ApplicationSetApplicationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastTransitionTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetApplicationStatus) contextValidateLastTransitionTime(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.LastTransitionTime) { // not required - return nil - } - - if err := m.LastTransitionTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTransitionTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTransitionTime") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetApplicationStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetApplicationStatus) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetApplicationStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_condition.go b/pkg/argocd/models/v1alpha1_application_set_condition.go deleted file mode 100644 index 5f32494..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_condition.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetCondition ApplicationSetCondition contains details about an applicationset condition, which is usually an error or warning -// -// swagger:model v1alpha1ApplicationSetCondition -type V1alpha1ApplicationSetCondition struct { - - // last transition time - // Format: date-time - LastTransitionTime V1Time `json:"lastTransitionTime,omitempty"` - - // Message contains human-readable message indicating details about condition - Message string `json:"message,omitempty"` - - // Single word camelcase representing the reason for the status eg ErrorOccurred - Reason string `json:"reason,omitempty"` - - // True/False/Unknown - Status string `json:"status,omitempty"` - - // Type is an applicationset condition type - Type string `json:"type,omitempty"` -} - -// Validate validates this v1alpha1 application set condition -func (m *V1alpha1ApplicationSetCondition) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastTransitionTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetCondition) validateLastTransitionTime(formats strfmt.Registry) error { - if swag.IsZero(m.LastTransitionTime) { // not required - return nil - } - - if err := m.LastTransitionTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTransitionTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTransitionTime") - } - return err - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set condition based on the context it is used -func (m *V1alpha1ApplicationSetCondition) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastTransitionTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetCondition) contextValidateLastTransitionTime(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.LastTransitionTime) { // not required - return nil - } - - if err := m.LastTransitionTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastTransitionTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastTransitionTime") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetCondition) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetCondition) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetCondition - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_generator.go b/pkg/argocd/models/v1alpha1_application_set_generator.go deleted file mode 100644 index be0f144..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_generator.go +++ /dev/null @@ -1,568 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetGenerator ApplicationSetGenerator represents a generator at the top level of an ApplicationSet. -// -// swagger:model v1alpha1ApplicationSetGenerator -type V1alpha1ApplicationSetGenerator struct { - - // cluster decision resource - ClusterDecisionResource *V1alpha1DuckTypeGenerator `json:"clusterDecisionResource,omitempty"` - - // clusters - Clusters *V1alpha1ClusterGenerator `json:"clusters,omitempty"` - - // git - Git *V1alpha1GitGenerator `json:"git,omitempty"` - - // list - List *V1alpha1ListGenerator `json:"list,omitempty"` - - // matrix - Matrix *V1alpha1MatrixGenerator `json:"matrix,omitempty"` - - // merge - Merge *V1alpha1MergeGenerator `json:"merge,omitempty"` - - // plugin - Plugin *V1alpha1PluginGenerator `json:"plugin,omitempty"` - - // pull request - PullRequest *V1alpha1PullRequestGenerator `json:"pullRequest,omitempty"` - - // scm provider - ScmProvider *V1alpha1SCMProviderGenerator `json:"scmProvider,omitempty"` - - // selector - Selector *V1LabelSelector `json:"selector,omitempty"` -} - -// Validate validates this v1alpha1 application set generator -func (m *V1alpha1ApplicationSetGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterDecisionResource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMatrix(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMerge(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePlugin(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePullRequest(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScmProvider(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSelector(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateClusterDecisionResource(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterDecisionResource) { // not required - return nil - } - - if m.ClusterDecisionResource != nil { - if err := m.ClusterDecisionResource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterDecisionResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterDecisionResource") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateClusters(formats strfmt.Registry) error { - if swag.IsZero(m.Clusters) { // not required - return nil - } - - if m.Clusters != nil { - if err := m.Clusters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateGit(formats strfmt.Registry) error { - if swag.IsZero(m.Git) { // not required - return nil - } - - if m.Git != nil { - if err := m.Git.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("git") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("git") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateList(formats strfmt.Registry) error { - if swag.IsZero(m.List) { // not required - return nil - } - - if m.List != nil { - if err := m.List.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("list") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("list") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateMatrix(formats strfmt.Registry) error { - if swag.IsZero(m.Matrix) { // not required - return nil - } - - if m.Matrix != nil { - if err := m.Matrix.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateMerge(formats strfmt.Registry) error { - if swag.IsZero(m.Merge) { // not required - return nil - } - - if m.Merge != nil { - if err := m.Merge.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("merge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("merge") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validatePlugin(formats strfmt.Registry) error { - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if m.Plugin != nil { - if err := m.Plugin.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validatePullRequest(formats strfmt.Registry) error { - if swag.IsZero(m.PullRequest) { // not required - return nil - } - - if m.PullRequest != nil { - if err := m.PullRequest.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pullRequest") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pullRequest") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateScmProvider(formats strfmt.Registry) error { - if swag.IsZero(m.ScmProvider) { // not required - return nil - } - - if m.ScmProvider != nil { - if err := m.ScmProvider.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scmProvider") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scmProvider") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) validateSelector(formats strfmt.Registry) error { - if swag.IsZero(m.Selector) { // not required - return nil - } - - if m.Selector != nil { - if err := m.Selector.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set generator based on the context it is used -func (m *V1alpha1ApplicationSetGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterDecisionResource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGit(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMatrix(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMerge(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePlugin(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePullRequest(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScmProvider(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSelector(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateClusterDecisionResource(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterDecisionResource != nil { - - if swag.IsZero(m.ClusterDecisionResource) { // not required - return nil - } - - if err := m.ClusterDecisionResource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterDecisionResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterDecisionResource") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateClusters(ctx context.Context, formats strfmt.Registry) error { - - if m.Clusters != nil { - - if swag.IsZero(m.Clusters) { // not required - return nil - } - - if err := m.Clusters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateGit(ctx context.Context, formats strfmt.Registry) error { - - if m.Git != nil { - - if swag.IsZero(m.Git) { // not required - return nil - } - - if err := m.Git.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("git") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("git") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateList(ctx context.Context, formats strfmt.Registry) error { - - if m.List != nil { - - if swag.IsZero(m.List) { // not required - return nil - } - - if err := m.List.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("list") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("list") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateMatrix(ctx context.Context, formats strfmt.Registry) error { - - if m.Matrix != nil { - - if swag.IsZero(m.Matrix) { // not required - return nil - } - - if err := m.Matrix.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateMerge(ctx context.Context, formats strfmt.Registry) error { - - if m.Merge != nil { - - if swag.IsZero(m.Merge) { // not required - return nil - } - - if err := m.Merge.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("merge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("merge") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidatePlugin(ctx context.Context, formats strfmt.Registry) error { - - if m.Plugin != nil { - - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if err := m.Plugin.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidatePullRequest(ctx context.Context, formats strfmt.Registry) error { - - if m.PullRequest != nil { - - if swag.IsZero(m.PullRequest) { // not required - return nil - } - - if err := m.PullRequest.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pullRequest") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pullRequest") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateScmProvider(ctx context.Context, formats strfmt.Registry) error { - - if m.ScmProvider != nil { - - if swag.IsZero(m.ScmProvider) { // not required - return nil - } - - if err := m.ScmProvider.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scmProvider") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scmProvider") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetGenerator) contextValidateSelector(ctx context.Context, formats strfmt.Registry) error { - - if m.Selector != nil { - - if swag.IsZero(m.Selector) { // not required - return nil - } - - if err := m.Selector.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_list.go b/pkg/argocd/models/v1alpha1_application_set_list.go deleted file mode 100644 index b6cf04e..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_list.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetList ApplicationSetList contains a list of ApplicationSet -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// -// swagger:model v1alpha1ApplicationSetList -type V1alpha1ApplicationSetList struct { - - // items - Items []*V1alpha1ApplicationSet `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 application set list -func (m *V1alpha1ApplicationSetList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set list based on the context it is used -func (m *V1alpha1ApplicationSetList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetList) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_nested_generator.go b/pkg/argocd/models/v1alpha1_application_set_nested_generator.go deleted file mode 100644 index 91f8726..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_nested_generator.go +++ /dev/null @@ -1,569 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetNestedGenerator ApplicationSetNestedGenerator represents a generator nested within a combination-type generator (MatrixGenerator or -// MergeGenerator). -// -// swagger:model v1alpha1ApplicationSetNestedGenerator -type V1alpha1ApplicationSetNestedGenerator struct { - - // cluster decision resource - ClusterDecisionResource *V1alpha1DuckTypeGenerator `json:"clusterDecisionResource,omitempty"` - - // clusters - Clusters *V1alpha1ClusterGenerator `json:"clusters,omitempty"` - - // git - Git *V1alpha1GitGenerator `json:"git,omitempty"` - - // list - List *V1alpha1ListGenerator `json:"list,omitempty"` - - // matrix - Matrix *V1JSON `json:"matrix,omitempty"` - - // merge - Merge *V1JSON `json:"merge,omitempty"` - - // plugin - Plugin *V1alpha1PluginGenerator `json:"plugin,omitempty"` - - // pull request - PullRequest *V1alpha1PullRequestGenerator `json:"pullRequest,omitempty"` - - // scm provider - ScmProvider *V1alpha1SCMProviderGenerator `json:"scmProvider,omitempty"` - - // selector - Selector *V1LabelSelector `json:"selector,omitempty"` -} - -// Validate validates this v1alpha1 application set nested generator -func (m *V1alpha1ApplicationSetNestedGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateClusterDecisionResource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateClusters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateList(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMatrix(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMerge(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePlugin(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePullRequest(formats); err != nil { - res = append(res, err) - } - - if err := m.validateScmProvider(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSelector(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateClusterDecisionResource(formats strfmt.Registry) error { - if swag.IsZero(m.ClusterDecisionResource) { // not required - return nil - } - - if m.ClusterDecisionResource != nil { - if err := m.ClusterDecisionResource.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterDecisionResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterDecisionResource") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateClusters(formats strfmt.Registry) error { - if swag.IsZero(m.Clusters) { // not required - return nil - } - - if m.Clusters != nil { - if err := m.Clusters.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateGit(formats strfmt.Registry) error { - if swag.IsZero(m.Git) { // not required - return nil - } - - if m.Git != nil { - if err := m.Git.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("git") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("git") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateList(formats strfmt.Registry) error { - if swag.IsZero(m.List) { // not required - return nil - } - - if m.List != nil { - if err := m.List.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("list") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("list") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateMatrix(formats strfmt.Registry) error { - if swag.IsZero(m.Matrix) { // not required - return nil - } - - if m.Matrix != nil { - if err := m.Matrix.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateMerge(formats strfmt.Registry) error { - if swag.IsZero(m.Merge) { // not required - return nil - } - - if m.Merge != nil { - if err := m.Merge.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("merge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("merge") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validatePlugin(formats strfmt.Registry) error { - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if m.Plugin != nil { - if err := m.Plugin.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validatePullRequest(formats strfmt.Registry) error { - if swag.IsZero(m.PullRequest) { // not required - return nil - } - - if m.PullRequest != nil { - if err := m.PullRequest.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pullRequest") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pullRequest") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateScmProvider(formats strfmt.Registry) error { - if swag.IsZero(m.ScmProvider) { // not required - return nil - } - - if m.ScmProvider != nil { - if err := m.ScmProvider.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scmProvider") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scmProvider") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) validateSelector(formats strfmt.Registry) error { - if swag.IsZero(m.Selector) { // not required - return nil - } - - if m.Selector != nil { - if err := m.Selector.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set nested generator based on the context it is used -func (m *V1alpha1ApplicationSetNestedGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateClusterDecisionResource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateClusters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGit(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateList(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMatrix(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMerge(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePlugin(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePullRequest(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateScmProvider(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSelector(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateClusterDecisionResource(ctx context.Context, formats strfmt.Registry) error { - - if m.ClusterDecisionResource != nil { - - if swag.IsZero(m.ClusterDecisionResource) { // not required - return nil - } - - if err := m.ClusterDecisionResource.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusterDecisionResource") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusterDecisionResource") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateClusters(ctx context.Context, formats strfmt.Registry) error { - - if m.Clusters != nil { - - if swag.IsZero(m.Clusters) { // not required - return nil - } - - if err := m.Clusters.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("clusters") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("clusters") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateGit(ctx context.Context, formats strfmt.Registry) error { - - if m.Git != nil { - - if swag.IsZero(m.Git) { // not required - return nil - } - - if err := m.Git.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("git") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("git") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateList(ctx context.Context, formats strfmt.Registry) error { - - if m.List != nil { - - if swag.IsZero(m.List) { // not required - return nil - } - - if err := m.List.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("list") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("list") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateMatrix(ctx context.Context, formats strfmt.Registry) error { - - if m.Matrix != nil { - - if swag.IsZero(m.Matrix) { // not required - return nil - } - - if err := m.Matrix.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matrix") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matrix") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateMerge(ctx context.Context, formats strfmt.Registry) error { - - if m.Merge != nil { - - if swag.IsZero(m.Merge) { // not required - return nil - } - - if err := m.Merge.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("merge") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("merge") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidatePlugin(ctx context.Context, formats strfmt.Registry) error { - - if m.Plugin != nil { - - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if err := m.Plugin.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidatePullRequest(ctx context.Context, formats strfmt.Registry) error { - - if m.PullRequest != nil { - - if swag.IsZero(m.PullRequest) { // not required - return nil - } - - if err := m.PullRequest.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("pullRequest") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("pullRequest") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateScmProvider(ctx context.Context, formats strfmt.Registry) error { - - if m.ScmProvider != nil { - - if swag.IsZero(m.ScmProvider) { // not required - return nil - } - - if err := m.ScmProvider.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("scmProvider") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("scmProvider") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetNestedGenerator) contextValidateSelector(ctx context.Context, formats strfmt.Registry) error { - - if m.Selector != nil { - - if swag.IsZero(m.Selector) { // not required - return nil - } - - if err := m.Selector.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetNestedGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetNestedGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetNestedGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_resource_ignore_differences.go b/pkg/argocd/models/v1alpha1_application_set_resource_ignore_differences.go deleted file mode 100644 index 675ddb6..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_resource_ignore_differences.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetResourceIgnoreDifferences ApplicationSetResourceIgnoreDifferences configures how the ApplicationSet controller will ignore differences in live -// applications when applying changes from generated applications. -// -// swagger:model v1alpha1ApplicationSetResourceIgnoreDifferences -type V1alpha1ApplicationSetResourceIgnoreDifferences struct { - - // JQPathExpressions is a list of JQ path expressions to fields to ignore differences for. - JqPathExpressions []string `json:"jqPathExpressions"` - - // JSONPointers is a list of JSON pointers to fields to ignore differences for. - JSONPointers []string `json:"jsonPointers"` - - // Name is the name of the application to ignore differences for. If not specified, the rule applies to all applications. - Name string `json:"name,omitempty"` -} - -// Validate validates this v1alpha1 application set resource ignore differences -func (m *V1alpha1ApplicationSetResourceIgnoreDifferences) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application set resource ignore differences based on context it is used -func (m *V1alpha1ApplicationSetResourceIgnoreDifferences) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetResourceIgnoreDifferences) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetResourceIgnoreDifferences) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetResourceIgnoreDifferences - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_rollout_step.go b/pkg/argocd/models/v1alpha1_application_set_rollout_step.go deleted file mode 100644 index 4715967..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_rollout_step.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetRolloutStep v1alpha1 application set rollout step -// -// swagger:model v1alpha1ApplicationSetRolloutStep -type V1alpha1ApplicationSetRolloutStep struct { - - // match expressions - MatchExpressions []*V1alpha1ApplicationMatchExpression `json:"matchExpressions"` - - // max update - MaxUpdate *IntstrIntOrString `json:"maxUpdate,omitempty"` -} - -// Validate validates this v1alpha1 application set rollout step -func (m *V1alpha1ApplicationSetRolloutStep) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMatchExpressions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMaxUpdate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetRolloutStep) validateMatchExpressions(formats strfmt.Registry) error { - if swag.IsZero(m.MatchExpressions) { // not required - return nil - } - - for i := 0; i < len(m.MatchExpressions); i++ { - if swag.IsZero(m.MatchExpressions[i]) { // not required - continue - } - - if m.MatchExpressions[i] != nil { - if err := m.MatchExpressions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetRolloutStep) validateMaxUpdate(formats strfmt.Registry) error { - if swag.IsZero(m.MaxUpdate) { // not required - return nil - } - - if m.MaxUpdate != nil { - if err := m.MaxUpdate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxUpdate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxUpdate") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set rollout step based on the context it is used -func (m *V1alpha1ApplicationSetRolloutStep) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMatchExpressions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMaxUpdate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetRolloutStep) contextValidateMatchExpressions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.MatchExpressions); i++ { - - if m.MatchExpressions[i] != nil { - - if swag.IsZero(m.MatchExpressions[i]) { // not required - return nil - } - - if err := m.MatchExpressions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetRolloutStep) contextValidateMaxUpdate(ctx context.Context, formats strfmt.Registry) error { - - if m.MaxUpdate != nil { - - if swag.IsZero(m.MaxUpdate) { // not required - return nil - } - - if err := m.MaxUpdate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("maxUpdate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("maxUpdate") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetRolloutStep) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetRolloutStep) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetRolloutStep - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_rollout_strategy.go b/pkg/argocd/models/v1alpha1_application_set_rollout_strategy.go deleted file mode 100644 index 4d12e0d..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_rollout_strategy.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetRolloutStrategy v1alpha1 application set rollout strategy -// -// swagger:model v1alpha1ApplicationSetRolloutStrategy -type V1alpha1ApplicationSetRolloutStrategy struct { - - // steps - Steps []*V1alpha1ApplicationSetRolloutStep `json:"steps"` -} - -// Validate validates this v1alpha1 application set rollout strategy -func (m *V1alpha1ApplicationSetRolloutStrategy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSteps(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetRolloutStrategy) validateSteps(formats strfmt.Registry) error { - if swag.IsZero(m.Steps) { // not required - return nil - } - - for i := 0; i < len(m.Steps); i++ { - if swag.IsZero(m.Steps[i]) { // not required - continue - } - - if m.Steps[i] != nil { - if err := m.Steps[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("steps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("steps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set rollout strategy based on the context it is used -func (m *V1alpha1ApplicationSetRolloutStrategy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSteps(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetRolloutStrategy) contextValidateSteps(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Steps); i++ { - - if m.Steps[i] != nil { - - if swag.IsZero(m.Steps[i]) { // not required - return nil - } - - if err := m.Steps[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("steps" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("steps" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetRolloutStrategy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetRolloutStrategy) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetRolloutStrategy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_spec.go b/pkg/argocd/models/v1alpha1_application_set_spec.go deleted file mode 100644 index bb9893b..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_spec.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetSpec ApplicationSetSpec represents a class of application set state. -// -// swagger:model v1alpha1ApplicationSetSpec -type V1alpha1ApplicationSetSpec struct { - - // ApplyNestedSelectors enables selectors defined within the generators of two level-nested matrix or merge generators - ApplyNestedSelectors bool `json:"applyNestedSelectors,omitempty"` - - // generators - Generators []*V1alpha1ApplicationSetGenerator `json:"generators"` - - // go template - GoTemplate bool `json:"goTemplate,omitempty"` - - // go template options - GoTemplateOptions []string `json:"goTemplateOptions"` - - // ignore application differences - IgnoreApplicationDifferences []*V1alpha1ApplicationSetResourceIgnoreDifferences `json:"ignoreApplicationDifferences"` - - // preserved fields - PreservedFields *V1alpha1ApplicationPreservedFields `json:"preservedFields,omitempty"` - - // strategy - Strategy *V1alpha1ApplicationSetStrategy `json:"strategy,omitempty"` - - // sync policy - SyncPolicy *V1alpha1ApplicationSetSyncPolicy `json:"syncPolicy,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` - - // template patch - TemplatePatch string `json:"templatePatch,omitempty"` -} - -// Validate validates this v1alpha1 application set spec -func (m *V1alpha1ApplicationSetSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGenerators(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIgnoreApplicationDifferences(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePreservedFields(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStrategy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyncPolicy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetSpec) validateGenerators(formats strfmt.Registry) error { - if swag.IsZero(m.Generators) { // not required - return nil - } - - for i := 0; i < len(m.Generators); i++ { - if swag.IsZero(m.Generators[i]) { // not required - continue - } - - if m.Generators[i] != nil { - if err := m.Generators[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generators" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generators" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) validateIgnoreApplicationDifferences(formats strfmt.Registry) error { - if swag.IsZero(m.IgnoreApplicationDifferences) { // not required - return nil - } - - for i := 0; i < len(m.IgnoreApplicationDifferences); i++ { - if swag.IsZero(m.IgnoreApplicationDifferences[i]) { // not required - continue - } - - if m.IgnoreApplicationDifferences[i] != nil { - if err := m.IgnoreApplicationDifferences[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreApplicationDifferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreApplicationDifferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) validatePreservedFields(formats strfmt.Registry) error { - if swag.IsZero(m.PreservedFields) { // not required - return nil - } - - if m.PreservedFields != nil { - if err := m.PreservedFields.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservedFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservedFields") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) validateStrategy(formats strfmt.Registry) error { - if swag.IsZero(m.Strategy) { // not required - return nil - } - - if m.Strategy != nil { - if err := m.Strategy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("strategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("strategy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) validateSyncPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SyncPolicy) { // not required - return nil - } - - if m.SyncPolicy != nil { - if err := m.SyncPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncPolicy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set spec based on the context it is used -func (m *V1alpha1ApplicationSetSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGenerators(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIgnoreApplicationDifferences(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePreservedFields(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStrategy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyncPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetSpec) contextValidateGenerators(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Generators); i++ { - - if m.Generators[i] != nil { - - if swag.IsZero(m.Generators[i]) { // not required - return nil - } - - if err := m.Generators[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generators" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generators" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) contextValidateIgnoreApplicationDifferences(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IgnoreApplicationDifferences); i++ { - - if m.IgnoreApplicationDifferences[i] != nil { - - if swag.IsZero(m.IgnoreApplicationDifferences[i]) { // not required - return nil - } - - if err := m.IgnoreApplicationDifferences[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreApplicationDifferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreApplicationDifferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) contextValidatePreservedFields(ctx context.Context, formats strfmt.Registry) error { - - if m.PreservedFields != nil { - - if swag.IsZero(m.PreservedFields) { // not required - return nil - } - - if err := m.PreservedFields.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("preservedFields") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("preservedFields") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) contextValidateStrategy(ctx context.Context, formats strfmt.Registry) error { - - if m.Strategy != nil { - - if swag.IsZero(m.Strategy) { // not required - return nil - } - - if err := m.Strategy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("strategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("strategy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) contextValidateSyncPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SyncPolicy != nil { - - if swag.IsZero(m.SyncPolicy) { // not required - return nil - } - - if err := m.SyncPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncPolicy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetSpec) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetSpec) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_status.go b/pkg/argocd/models/v1alpha1_application_set_status.go deleted file mode 100644 index 304cb03..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_status.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetStatus ApplicationSetStatus defines the observed state of ApplicationSet -// -// swagger:model v1alpha1ApplicationSetStatus -type V1alpha1ApplicationSetStatus struct { - - // application status - ApplicationStatus []*V1alpha1ApplicationSetApplicationStatus `json:"applicationStatus"` - - // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster - // Important: Run "make" to regenerate code after modifying this file - Conditions []*V1alpha1ApplicationSetCondition `json:"conditions"` - - // Resources is a list of Applications resources managed by this application set. - Resources []*V1alpha1ResourceStatus `json:"resources"` -} - -// Validate validates this v1alpha1 application set status -func (m *V1alpha1ApplicationSetStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplicationStatus(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConditions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetStatus) validateApplicationStatus(formats strfmt.Registry) error { - if swag.IsZero(m.ApplicationStatus) { // not required - return nil - } - - for i := 0; i < len(m.ApplicationStatus); i++ { - if swag.IsZero(m.ApplicationStatus[i]) { // not required - continue - } - - if m.ApplicationStatus[i] != nil { - if err := m.ApplicationStatus[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetStatus) validateConditions(formats strfmt.Registry) error { - if swag.IsZero(m.Conditions) { // not required - return nil - } - - for i := 0; i < len(m.Conditions); i++ { - if swag.IsZero(m.Conditions[i]) { // not required - continue - } - - if m.Conditions[i] != nil { - if err := m.Conditions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetStatus) validateResources(formats strfmt.Registry) error { - if swag.IsZero(m.Resources) { // not required - return nil - } - - for i := 0; i < len(m.Resources); i++ { - if swag.IsZero(m.Resources[i]) { // not required - continue - } - - if m.Resources[i] != nil { - if err := m.Resources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set status based on the context it is used -func (m *V1alpha1ApplicationSetStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplicationStatus(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConditions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetStatus) contextValidateApplicationStatus(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ApplicationStatus); i++ { - - if m.ApplicationStatus[i] != nil { - - if swag.IsZero(m.ApplicationStatus[i]) { // not required - return nil - } - - if err := m.ApplicationStatus[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("applicationStatus" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("applicationStatus" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetStatus) contextValidateConditions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Conditions); i++ { - - if m.Conditions[i] != nil { - - if swag.IsZero(m.Conditions[i]) { // not required - return nil - } - - if err := m.Conditions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSetStatus) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Resources); i++ { - - if m.Resources[i] != nil { - - if swag.IsZero(m.Resources[i]) { // not required - return nil - } - - if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetStatus) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_strategy.go b/pkg/argocd/models/v1alpha1_application_set_strategy.go deleted file mode 100644 index 2192f6f..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_strategy.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetStrategy ApplicationSetStrategy configures how generated Applications are updated in sequence. -// -// swagger:model v1alpha1ApplicationSetStrategy -type V1alpha1ApplicationSetStrategy struct { - - // rolling sync - RollingSync *V1alpha1ApplicationSetRolloutStrategy `json:"rollingSync,omitempty"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this v1alpha1 application set strategy -func (m *V1alpha1ApplicationSetStrategy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRollingSync(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetStrategy) validateRollingSync(formats strfmt.Registry) error { - if swag.IsZero(m.RollingSync) { // not required - return nil - } - - if m.RollingSync != nil { - if err := m.RollingSync.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rollingSync") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rollingSync") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set strategy based on the context it is used -func (m *V1alpha1ApplicationSetStrategy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateRollingSync(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetStrategy) contextValidateRollingSync(ctx context.Context, formats strfmt.Registry) error { - - if m.RollingSync != nil { - - if swag.IsZero(m.RollingSync) { // not required - return nil - } - - if err := m.RollingSync.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("rollingSync") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("rollingSync") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetStrategy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetStrategy) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetStrategy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_sync_policy.go b/pkg/argocd/models/v1alpha1_application_set_sync_policy.go deleted file mode 100644 index f15726a..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_sync_policy.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetSyncPolicy ApplicationSetSyncPolicy configures how generated Applications will relate to their -// ApplicationSet. -// -// swagger:model v1alpha1ApplicationSetSyncPolicy -type V1alpha1ApplicationSetSyncPolicy struct { - - // ApplicationsSync represents the policy applied on the generated applications. Possible values are create-only, create-update, create-delete, sync - // +kubebuilder:validation:Optional - // +kubebuilder:validation:Enum=create-only;create-update;create-delete;sync - ApplicationsSync string `json:"applicationsSync,omitempty"` - - // PreserveResourcesOnDeletion will preserve resources on deletion. If PreserveResourcesOnDeletion is set to true, these Applications will not be deleted. - PreserveResourcesOnDeletion bool `json:"preserveResourcesOnDeletion,omitempty"` -} - -// Validate validates this v1alpha1 application set sync policy -func (m *V1alpha1ApplicationSetSyncPolicy) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application set sync policy based on context it is used -func (m *V1alpha1ApplicationSetSyncPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetSyncPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetSyncPolicy) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetSyncPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_template.go b/pkg/argocd/models/v1alpha1_application_set_template.go deleted file mode 100644 index 6a2209a..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_template.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetTemplate ApplicationSetTemplate represents argocd ApplicationSpec -// -// swagger:model v1alpha1ApplicationSetTemplate -type V1alpha1ApplicationSetTemplate struct { - - // metadata - Metadata *V1alpha1ApplicationSetTemplateMeta `json:"metadata,omitempty"` - - // spec - Spec *V1alpha1ApplicationSpec `json:"spec,omitempty"` -} - -// Validate validates this v1alpha1 application set template -func (m *V1alpha1ApplicationSetTemplate) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpec(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetTemplate) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetTemplate) validateSpec(formats strfmt.Registry) error { - if swag.IsZero(m.Spec) { // not required - return nil - } - - if m.Spec != nil { - if err := m.Spec.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set template based on the context it is used -func (m *V1alpha1ApplicationSetTemplate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSpec(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetTemplate) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSetTemplate) contextValidateSpec(ctx context.Context, formats strfmt.Registry) error { - - if m.Spec != nil { - - if swag.IsZero(m.Spec) { // not required - return nil - } - - if err := m.Spec.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("spec") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("spec") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetTemplate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetTemplate) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetTemplate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_template_meta.go b/pkg/argocd/models/v1alpha1_application_set_template_meta.go deleted file mode 100644 index 9090973..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_template_meta.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetTemplateMeta ApplicationSetTemplateMeta represents the Argo CD application fields that may -// be used for Applications generated from the ApplicationSet (based on metav1.ObjectMeta) -// -// swagger:model v1alpha1ApplicationSetTemplateMeta -type V1alpha1ApplicationSetTemplateMeta struct { - - // annotations - Annotations map[string]string `json:"annotations,omitempty"` - - // finalizers - Finalizers []string `json:"finalizers"` - - // labels - Labels map[string]string `json:"labels,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // namespace - Namespace string `json:"namespace,omitempty"` -} - -// Validate validates this v1alpha1 application set template meta -func (m *V1alpha1ApplicationSetTemplateMeta) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application set template meta based on context it is used -func (m *V1alpha1ApplicationSetTemplateMeta) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetTemplateMeta) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetTemplateMeta) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetTemplateMeta - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_set_tree.go b/pkg/argocd/models/v1alpha1_application_set_tree.go deleted file mode 100644 index 5f0861e..0000000 --- a/pkg/argocd/models/v1alpha1_application_set_tree.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSetTree ApplicationSetTree holds nodes which belongs to the application -// Used to build a tree of an ApplicationSet and its children -// -// swagger:model v1alpha1ApplicationSetTree -type V1alpha1ApplicationSetTree struct { - - // Nodes contains list of nodes which are directly managed by the applicationset - Nodes []*V1alpha1ResourceNode `json:"nodes"` -} - -// Validate validates this v1alpha1 application set tree -func (m *V1alpha1ApplicationSetTree) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetTree) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 application set tree based on the context it is used -func (m *V1alpha1ApplicationSetTree) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSetTree) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSetTree) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSetTree) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSetTree - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_source.go b/pkg/argocd/models/v1alpha1_application_source.go deleted file mode 100644 index 31e1a5c..0000000 --- a/pkg/argocd/models/v1alpha1_application_source.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSource ApplicationSource contains all required information about the source of an application -// -// swagger:model v1alpha1ApplicationSource -type V1alpha1ApplicationSource struct { - - // Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo. - Chart string `json:"chart,omitempty"` - - // directory - Directory *V1alpha1ApplicationSourceDirectory `json:"directory,omitempty"` - - // helm - Helm *V1alpha1ApplicationSourceHelm `json:"helm,omitempty"` - - // kustomize - Kustomize *V1alpha1ApplicationSourceKustomize `json:"kustomize,omitempty"` - - // Path is a directory path within the Git repository, and is only valid for applications sourced from Git. - Path string `json:"path,omitempty"` - - // plugin - Plugin *V1alpha1ApplicationSourcePlugin `json:"plugin,omitempty"` - - // Ref is reference to another source within sources field. This field will not be used if used with a `source` tag. - Ref string `json:"ref,omitempty"` - - // RepoURL is the URL to the repository (Git or Helm) that contains the application manifests - RepoURL string `json:"repoURL,omitempty"` - - // TargetRevision defines the revision of the source to sync the application to. - // In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. - // In case of Helm, this is a semver tag for the Chart's version. - TargetRevision string `json:"targetRevision,omitempty"` -} - -// Validate validates this v1alpha1 application source -func (m *V1alpha1ApplicationSource) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDirectory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHelm(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKustomize(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePlugin(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSource) validateDirectory(formats strfmt.Registry) error { - if swag.IsZero(m.Directory) { // not required - return nil - } - - if m.Directory != nil { - if err := m.Directory.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directory") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directory") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSource) validateHelm(formats strfmt.Registry) error { - if swag.IsZero(m.Helm) { // not required - return nil - } - - if m.Helm != nil { - if err := m.Helm.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("helm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("helm") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSource) validateKustomize(formats strfmt.Registry) error { - if swag.IsZero(m.Kustomize) { // not required - return nil - } - - if m.Kustomize != nil { - if err := m.Kustomize.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kustomize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kustomize") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSource) validatePlugin(formats strfmt.Registry) error { - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if m.Plugin != nil { - if err := m.Plugin.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application source based on the context it is used -func (m *V1alpha1ApplicationSource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDirectory(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHelm(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKustomize(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidatePlugin(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSource) contextValidateDirectory(ctx context.Context, formats strfmt.Registry) error { - - if m.Directory != nil { - - if swag.IsZero(m.Directory) { // not required - return nil - } - - if err := m.Directory.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directory") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directory") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSource) contextValidateHelm(ctx context.Context, formats strfmt.Registry) error { - - if m.Helm != nil { - - if swag.IsZero(m.Helm) { // not required - return nil - } - - if err := m.Helm.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("helm") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("helm") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSource) contextValidateKustomize(ctx context.Context, formats strfmt.Registry) error { - - if m.Kustomize != nil { - - if swag.IsZero(m.Kustomize) { // not required - return nil - } - - if err := m.Kustomize.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("kustomize") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("kustomize") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSource) contextValidatePlugin(ctx context.Context, formats strfmt.Registry) error { - - if m.Plugin != nil { - - if swag.IsZero(m.Plugin) { // not required - return nil - } - - if err := m.Plugin.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("plugin") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("plugin") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSource) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_source_directory.go b/pkg/argocd/models/v1alpha1_application_source_directory.go deleted file mode 100644 index 055eaf4..0000000 --- a/pkg/argocd/models/v1alpha1_application_source_directory.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSourceDirectory ApplicationSourceDirectory holds options for applications of type plain YAML or Jsonnet -// -// swagger:model v1alpha1ApplicationSourceDirectory -type V1alpha1ApplicationSourceDirectory struct { - - // Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation - Exclude string `json:"exclude,omitempty"` - - // Include contains a glob pattern to match paths against that should be explicitly included during manifest generation - Include string `json:"include,omitempty"` - - // jsonnet - Jsonnet *V1alpha1ApplicationSourceJsonnet `json:"jsonnet,omitempty"` - - // Recurse specifies whether to scan a directory recursively for manifests - Recurse bool `json:"recurse,omitempty"` -} - -// Validate validates this v1alpha1 application source directory -func (m *V1alpha1ApplicationSourceDirectory) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJsonnet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceDirectory) validateJsonnet(formats strfmt.Registry) error { - if swag.IsZero(m.Jsonnet) { // not required - return nil - } - - if m.Jsonnet != nil { - if err := m.Jsonnet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jsonnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jsonnet") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application source directory based on the context it is used -func (m *V1alpha1ApplicationSourceDirectory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJsonnet(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceDirectory) contextValidateJsonnet(ctx context.Context, formats strfmt.Registry) error { - - if m.Jsonnet != nil { - - if swag.IsZero(m.Jsonnet) { // not required - return nil - } - - if err := m.Jsonnet.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jsonnet") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jsonnet") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceDirectory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceDirectory) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSourceDirectory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_source_helm.go b/pkg/argocd/models/v1alpha1_application_source_helm.go deleted file mode 100644 index 6f927ef..0000000 --- a/pkg/argocd/models/v1alpha1_application_source_helm.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSourceHelm ApplicationSourceHelm holds helm specific options -// -// swagger:model v1alpha1ApplicationSourceHelm -type V1alpha1ApplicationSourceHelm struct { - - // FileParameters are file parameters to the helm template - FileParameters []*V1alpha1HelmFileParameter `json:"fileParameters"` - - // IgnoreMissingValueFiles prevents helm template from failing when valueFiles do not exist locally by not appending them to helm template --values - IgnoreMissingValueFiles bool `json:"ignoreMissingValueFiles,omitempty"` - - // Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation - Parameters []*V1alpha1HelmParameter `json:"parameters"` - - // PassCredentials pass credentials to all domains (Helm's --pass-credentials) - PassCredentials bool `json:"passCredentials,omitempty"` - - // ReleaseName is the Helm release name to use. If omitted it will use the application name - ReleaseName string `json:"releaseName,omitempty"` - - // SkipCrds skips custom resource definition installation step (Helm's --skip-crds) - SkipCrds bool `json:"skipCrds,omitempty"` - - // ValuesFiles is a list of Helm value files to use when generating a template - ValueFiles []string `json:"valueFiles"` - - // Values specifies Helm values to be passed to helm template, typically defined as a block. ValuesObject takes precedence over Values, so use one or the other. - // +patchStrategy=replace - Values string `json:"values,omitempty"` - - // values object - ValuesObject *RuntimeRawExtension `json:"valuesObject,omitempty"` - - // Version is the Helm version to use for templating ("3") - Version string `json:"version,omitempty"` -} - -// Validate validates this v1alpha1 application source helm -func (m *V1alpha1ApplicationSourceHelm) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFileParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParameters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateValuesObject(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceHelm) validateFileParameters(formats strfmt.Registry) error { - if swag.IsZero(m.FileParameters) { // not required - return nil - } - - for i := 0; i < len(m.FileParameters); i++ { - if swag.IsZero(m.FileParameters[i]) { // not required - continue - } - - if m.FileParameters[i] != nil { - if err := m.FileParameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceHelm) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required - return nil - } - - for i := 0; i < len(m.Parameters); i++ { - if swag.IsZero(m.Parameters[i]) { // not required - continue - } - - if m.Parameters[i] != nil { - if err := m.Parameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceHelm) validateValuesObject(formats strfmt.Registry) error { - if swag.IsZero(m.ValuesObject) { // not required - return nil - } - - if m.ValuesObject != nil { - if err := m.ValuesObject.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valuesObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valuesObject") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application source helm based on the context it is used -func (m *V1alpha1ApplicationSourceHelm) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFileParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateValuesObject(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceHelm) contextValidateFileParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.FileParameters); i++ { - - if m.FileParameters[i] != nil { - - if swag.IsZero(m.FileParameters[i]) { // not required - return nil - } - - if err := m.FileParameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("fileParameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceHelm) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Parameters); i++ { - - if m.Parameters[i] != nil { - - if swag.IsZero(m.Parameters[i]) { // not required - return nil - } - - if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceHelm) contextValidateValuesObject(ctx context.Context, formats strfmt.Registry) error { - - if m.ValuesObject != nil { - - if swag.IsZero(m.ValuesObject) { // not required - return nil - } - - if err := m.ValuesObject.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("valuesObject") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("valuesObject") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceHelm) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceHelm) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSourceHelm - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_source_jsonnet.go b/pkg/argocd/models/v1alpha1_application_source_jsonnet.go deleted file mode 100644 index cbfbc73..0000000 --- a/pkg/argocd/models/v1alpha1_application_source_jsonnet.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSourceJsonnet ApplicationSourceJsonnet holds options specific to applications of type Jsonnet -// -// swagger:model v1alpha1ApplicationSourceJsonnet -type V1alpha1ApplicationSourceJsonnet struct { - - // ExtVars is a list of Jsonnet External Variables - ExtVars []*V1alpha1JsonnetVar `json:"extVars"` - - // Additional library search dirs - Libs []string `json:"libs"` - - // TLAS is a list of Jsonnet Top-level Arguments - Tlas []*V1alpha1JsonnetVar `json:"tlas"` -} - -// Validate validates this v1alpha1 application source jsonnet -func (m *V1alpha1ApplicationSourceJsonnet) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateExtVars(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTlas(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceJsonnet) validateExtVars(formats strfmt.Registry) error { - if swag.IsZero(m.ExtVars) { // not required - return nil - } - - for i := 0; i < len(m.ExtVars); i++ { - if swag.IsZero(m.ExtVars[i]) { // not required - continue - } - - if m.ExtVars[i] != nil { - if err := m.ExtVars[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extVars" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extVars" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceJsonnet) validateTlas(formats strfmt.Registry) error { - if swag.IsZero(m.Tlas) { // not required - return nil - } - - for i := 0; i < len(m.Tlas); i++ { - if swag.IsZero(m.Tlas[i]) { // not required - continue - } - - if m.Tlas[i] != nil { - if err := m.Tlas[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tlas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tlas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 application source jsonnet based on the context it is used -func (m *V1alpha1ApplicationSourceJsonnet) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateExtVars(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTlas(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceJsonnet) contextValidateExtVars(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ExtVars); i++ { - - if m.ExtVars[i] != nil { - - if swag.IsZero(m.ExtVars[i]) { // not required - return nil - } - - if err := m.ExtVars[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("extVars" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("extVars" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceJsonnet) contextValidateTlas(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Tlas); i++ { - - if m.Tlas[i] != nil { - - if swag.IsZero(m.Tlas[i]) { // not required - return nil - } - - if err := m.Tlas[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tlas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tlas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceJsonnet) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceJsonnet) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSourceJsonnet - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_source_kustomize.go b/pkg/argocd/models/v1alpha1_application_source_kustomize.go deleted file mode 100644 index 4cce750..0000000 --- a/pkg/argocd/models/v1alpha1_application_source_kustomize.go +++ /dev/null @@ -1,219 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSourceKustomize ApplicationSourceKustomize holds options specific to an Application source specific to Kustomize -// -// swagger:model v1alpha1ApplicationSourceKustomize -type V1alpha1ApplicationSourceKustomize struct { - - // CommonAnnotations is a list of additional annotations to add to rendered manifests - CommonAnnotations map[string]string `json:"commonAnnotations,omitempty"` - - // CommonAnnotationsEnvsubst specifies whether to apply env variables substitution for annotation values - CommonAnnotationsEnvsubst bool `json:"commonAnnotationsEnvsubst,omitempty"` - - // CommonLabels is a list of additional labels to add to rendered manifests - CommonLabels map[string]string `json:"commonLabels,omitempty"` - - // Components specifies a list of kustomize components to add to the kustomization before building - Components []string `json:"components"` - - // ForceCommonAnnotations specifies whether to force applying common annotations to resources for Kustomize apps - ForceCommonAnnotations bool `json:"forceCommonAnnotations,omitempty"` - - // ForceCommonLabels specifies whether to force applying common labels to resources for Kustomize apps - ForceCommonLabels bool `json:"forceCommonLabels,omitempty"` - - // Images is a list of Kustomize image override specifications - Images []string `json:"images"` - - // LabelWithoutSelector specifies whether to apply common labels to resource selectors or not - LabelWithoutSelector bool `json:"labelWithoutSelector,omitempty"` - - // NamePrefix is a prefix appended to resources for Kustomize apps - NamePrefix string `json:"namePrefix,omitempty"` - - // NameSuffix is a suffix appended to resources for Kustomize apps - NameSuffix string `json:"nameSuffix,omitempty"` - - // Namespace sets the namespace that Kustomize adds to all resources - Namespace string `json:"namespace,omitempty"` - - // Patches is a list of Kustomize patches - Patches []*V1alpha1KustomizePatch `json:"patches"` - - // Replicas is a list of Kustomize Replicas override specifications - Replicas []*V1alpha1KustomizeReplica `json:"replicas"` - - // Version controls which version of Kustomize to use for rendering manifests - Version string `json:"version,omitempty"` -} - -// Validate validates this v1alpha1 application source kustomize -func (m *V1alpha1ApplicationSourceKustomize) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePatches(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReplicas(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceKustomize) validatePatches(formats strfmt.Registry) error { - if swag.IsZero(m.Patches) { // not required - return nil - } - - for i := 0; i < len(m.Patches); i++ { - if swag.IsZero(m.Patches[i]) { // not required - continue - } - - if m.Patches[i] != nil { - if err := m.Patches[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("patches" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("patches" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceKustomize) validateReplicas(formats strfmt.Registry) error { - if swag.IsZero(m.Replicas) { // not required - return nil - } - - for i := 0; i < len(m.Replicas); i++ { - if swag.IsZero(m.Replicas[i]) { // not required - continue - } - - if m.Replicas[i] != nil { - if err := m.Replicas[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 application source kustomize based on the context it is used -func (m *V1alpha1ApplicationSourceKustomize) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePatches(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReplicas(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourceKustomize) contextValidatePatches(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Patches); i++ { - - if m.Patches[i] != nil { - - if swag.IsZero(m.Patches[i]) { // not required - return nil - } - - if err := m.Patches[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("patches" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("patches" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourceKustomize) contextValidateReplicas(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Replicas); i++ { - - if m.Replicas[i] != nil { - - if swag.IsZero(m.Replicas[i]) { // not required - return nil - } - - if err := m.Replicas[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("replicas" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("replicas" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceKustomize) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSourceKustomize) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSourceKustomize - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_source_plugin.go b/pkg/argocd/models/v1alpha1_application_source_plugin.go deleted file mode 100644 index 06fd6a6..0000000 --- a/pkg/argocd/models/v1alpha1_application_source_plugin.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSourcePlugin ApplicationSourcePlugin holds options specific to config management plugins -// -// swagger:model v1alpha1ApplicationSourcePlugin -type V1alpha1ApplicationSourcePlugin struct { - - // env - Env []*Applicationv1alpha1EnvEntry `json:"env"` - - // name - Name string `json:"name,omitempty"` - - // parameters - Parameters []*V1alpha1ApplicationSourcePluginParameter `json:"parameters"` -} - -// Validate validates this v1alpha1 application source plugin -func (m *V1alpha1ApplicationSourcePlugin) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEnv(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourcePlugin) validateEnv(formats strfmt.Registry) error { - if swag.IsZero(m.Env) { // not required - return nil - } - - for i := 0; i < len(m.Env); i++ { - if swag.IsZero(m.Env[i]) { // not required - continue - } - - if m.Env[i] != nil { - if err := m.Env[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("env" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("env" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourcePlugin) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required - return nil - } - - for i := 0; i < len(m.Parameters); i++ { - if swag.IsZero(m.Parameters[i]) { // not required - continue - } - - if m.Parameters[i] != nil { - if err := m.Parameters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 application source plugin based on the context it is used -func (m *V1alpha1ApplicationSourcePlugin) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateEnv(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSourcePlugin) contextValidateEnv(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Env); i++ { - - if m.Env[i] != nil { - - if swag.IsZero(m.Env[i]) { // not required - return nil - } - - if err := m.Env[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("env" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("env" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSourcePlugin) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Parameters); i++ { - - if m.Parameters[i] != nil { - - if swag.IsZero(m.Parameters[i]) { // not required - return nil - } - - if err := m.Parameters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSourcePlugin) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSourcePlugin) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSourcePlugin - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_source_plugin_parameter.go b/pkg/argocd/models/v1alpha1_application_source_plugin_parameter.go deleted file mode 100644 index dca3d29..0000000 --- a/pkg/argocd/models/v1alpha1_application_source_plugin_parameter.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSourcePluginParameter v1alpha1 application source plugin parameter -// -// swagger:model v1alpha1ApplicationSourcePluginParameter -type V1alpha1ApplicationSourcePluginParameter struct { - - // Array is the value of an array type parameter. - Array []string `json:"array"` - - // Map is the value of a map type parameter. - Map map[string]string `json:"map,omitempty"` - - // Name is the name identifying a parameter. - Name string `json:"name,omitempty"` - - // String_ is the value of a string type parameter. - String string `json:"string,omitempty"` -} - -// Validate validates this v1alpha1 application source plugin parameter -func (m *V1alpha1ApplicationSourcePluginParameter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application source plugin parameter based on context it is used -func (m *V1alpha1ApplicationSourcePluginParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSourcePluginParameter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSourcePluginParameter) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSourcePluginParameter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_spec.go b/pkg/argocd/models/v1alpha1_application_spec.go deleted file mode 100644 index 2e099f1..0000000 --- a/pkg/argocd/models/v1alpha1_application_spec.go +++ /dev/null @@ -1,409 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSpec ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision. -// -// swagger:model v1alpha1ApplicationSpec -type V1alpha1ApplicationSpec struct { - - // destination - Destination *V1alpha1ApplicationDestination `json:"destination,omitempty"` - - // IgnoreDifferences is a list of resources and their fields which should be ignored during comparison - IgnoreDifferences []*V1alpha1ResourceIgnoreDifferences `json:"ignoreDifferences"` - - // Info contains a list of information (URLs, email addresses, and plain text) that relates to the application - Info []*V1alpha1Info `json:"info"` - - // Project is a reference to the project this application belongs to. - // The empty string means that application belongs to the 'default' project. - Project string `json:"project,omitempty"` - - // RevisionHistoryLimit limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. - // This should only be changed in exceptional circumstances. - // Setting to zero will store no history. This will reduce storage used. - // Increasing will increase the space used to store the history, so we do not recommend increasing it. - // Default is 10. - RevisionHistoryLimit int64 `json:"revisionHistoryLimit,omitempty"` - - // source - Source *V1alpha1ApplicationSource `json:"source,omitempty"` - - // Sources is a reference to the location of the application's manifests or chart - Sources []*V1alpha1ApplicationSource `json:"sources"` - - // sync policy - SyncPolicy *V1alpha1SyncPolicy `json:"syncPolicy,omitempty"` -} - -// Validate validates this v1alpha1 application spec -func (m *V1alpha1ApplicationSpec) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDestination(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIgnoreDifferences(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyncPolicy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSpec) validateDestination(formats strfmt.Registry) error { - if swag.IsZero(m.Destination) { // not required - return nil - } - - if m.Destination != nil { - if err := m.Destination.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destination") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destination") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) validateIgnoreDifferences(formats strfmt.Registry) error { - if swag.IsZero(m.IgnoreDifferences) { // not required - return nil - } - - for i := 0; i < len(m.IgnoreDifferences); i++ { - if swag.IsZero(m.IgnoreDifferences[i]) { // not required - continue - } - - if m.IgnoreDifferences[i] != nil { - if err := m.IgnoreDifferences[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) validateInfo(formats strfmt.Registry) error { - if swag.IsZero(m.Info) { // not required - return nil - } - - for i := 0; i < len(m.Info); i++ { - if swag.IsZero(m.Info[i]) { // not required - continue - } - - if m.Info[i] != nil { - if err := m.Info[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) validateSyncPolicy(formats strfmt.Registry) error { - if swag.IsZero(m.SyncPolicy) { // not required - return nil - } - - if m.SyncPolicy != nil { - if err := m.SyncPolicy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncPolicy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application spec based on the context it is used -func (m *V1alpha1ApplicationSpec) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDestination(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIgnoreDifferences(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyncPolicy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationSpec) contextValidateDestination(ctx context.Context, formats strfmt.Registry) error { - - if m.Destination != nil { - - if swag.IsZero(m.Destination) { // not required - return nil - } - - if err := m.Destination.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destination") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destination") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) contextValidateIgnoreDifferences(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IgnoreDifferences); i++ { - - if m.IgnoreDifferences[i] != nil { - - if swag.IsZero(m.IgnoreDifferences[i]) { // not required - return nil - } - - if err := m.IgnoreDifferences[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) contextValidateInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Info); i++ { - - if m.Info[i] != nil { - - if swag.IsZero(m.Info[i]) { // not required - return nil - } - - if err := m.Info[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationSpec) contextValidateSyncPolicy(ctx context.Context, formats strfmt.Registry) error { - - if m.SyncPolicy != nil { - - if swag.IsZero(m.SyncPolicy) { // not required - return nil - } - - if err := m.SyncPolicy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncPolicy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncPolicy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSpec) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSpec) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSpec - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_status.go b/pkg/argocd/models/v1alpha1_application_status.go deleted file mode 100644 index cbab778..0000000 --- a/pkg/argocd/models/v1alpha1_application_status.go +++ /dev/null @@ -1,555 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationStatus ApplicationStatus contains status information for the application -// -// swagger:model v1alpha1ApplicationStatus -type V1alpha1ApplicationStatus struct { - - // Conditions is a list of currently observed application conditions - Conditions []*V1alpha1ApplicationCondition `json:"conditions"` - - // ControllerNamespace indicates the namespace in which the application controller is located - ControllerNamespace string `json:"controllerNamespace,omitempty"` - - // health - Health *V1alpha1HealthStatus `json:"health,omitempty"` - - // History contains information about the application's sync history - History []*V1alpha1RevisionHistory `json:"history"` - - // observed at - // Format: date-time - ObservedAt V1Time `json:"observedAt,omitempty"` - - // operation state - OperationState *V1alpha1OperationState `json:"operationState,omitempty"` - - // reconciled at - // Format: date-time - ReconciledAt V1Time `json:"reconciledAt,omitempty"` - - // ResourceHealthSource indicates where the resource health status is stored: inline if not set or appTree - ResourceHealthSource string `json:"resourceHealthSource,omitempty"` - - // Resources is a list of Kubernetes resources managed by this application - Resources []*V1alpha1ResourceStatus `json:"resources"` - - // SourceType specifies the type of this application - SourceType string `json:"sourceType,omitempty"` - - // SourceTypes specifies the type of the sources included in the application - SourceTypes []string `json:"sourceTypes"` - - // summary - Summary *V1alpha1ApplicationSummary `json:"summary,omitempty"` - - // sync - Sync *V1alpha1SyncStatus `json:"sync,omitempty"` -} - -// Validate validates this v1alpha1 application status -func (m *V1alpha1ApplicationStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConditions(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHealth(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHistory(formats); err != nil { - res = append(res, err) - } - - if err := m.validateObservedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperationState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateReconciledAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSummary(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSync(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationStatus) validateConditions(formats strfmt.Registry) error { - if swag.IsZero(m.Conditions) { // not required - return nil - } - - for i := 0; i < len(m.Conditions); i++ { - if swag.IsZero(m.Conditions[i]) { // not required - continue - } - - if m.Conditions[i] != nil { - if err := m.Conditions[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateHealth(formats strfmt.Registry) error { - if swag.IsZero(m.Health) { // not required - return nil - } - - if m.Health != nil { - if err := m.Health.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateHistory(formats strfmt.Registry) error { - if swag.IsZero(m.History) { // not required - return nil - } - - for i := 0; i < len(m.History); i++ { - if swag.IsZero(m.History[i]) { // not required - continue - } - - if m.History[i] != nil { - if err := m.History[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("history" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("history" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateObservedAt(formats strfmt.Registry) error { - if swag.IsZero(m.ObservedAt) { // not required - return nil - } - - if err := m.ObservedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("observedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("observedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateOperationState(formats strfmt.Registry) error { - if swag.IsZero(m.OperationState) { // not required - return nil - } - - if m.OperationState != nil { - if err := m.OperationState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operationState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operationState") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateReconciledAt(formats strfmt.Registry) error { - if swag.IsZero(m.ReconciledAt) { // not required - return nil - } - - if err := m.ReconciledAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reconciledAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reconciledAt") - } - return err - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateResources(formats strfmt.Registry) error { - if swag.IsZero(m.Resources) { // not required - return nil - } - - for i := 0; i < len(m.Resources); i++ { - if swag.IsZero(m.Resources[i]) { // not required - continue - } - - if m.Resources[i] != nil { - if err := m.Resources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateSummary(formats strfmt.Registry) error { - if swag.IsZero(m.Summary) { // not required - return nil - } - - if m.Summary != nil { - if err := m.Summary.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summary") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) validateSync(formats strfmt.Registry) error { - if swag.IsZero(m.Sync) { // not required - return nil - } - - if m.Sync != nil { - if err := m.Sync.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sync") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sync") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application status based on the context it is used -func (m *V1alpha1ApplicationStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConditions(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHealth(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHistory(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateObservedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOperationState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateReconciledAt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSummary(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSync(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateConditions(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Conditions); i++ { - - if m.Conditions[i] != nil { - - if swag.IsZero(m.Conditions[i]) { // not required - return nil - } - - if err := m.Conditions[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("conditions" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { - - if m.Health != nil { - - if swag.IsZero(m.Health) { // not required - return nil - } - - if err := m.Health.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateHistory(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.History); i++ { - - if m.History[i] != nil { - - if swag.IsZero(m.History[i]) { // not required - return nil - } - - if err := m.History[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("history" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("history" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateObservedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.ObservedAt) { // not required - return nil - } - - if err := m.ObservedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("observedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("observedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateOperationState(ctx context.Context, formats strfmt.Registry) error { - - if m.OperationState != nil { - - if swag.IsZero(m.OperationState) { // not required - return nil - } - - if err := m.OperationState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operationState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operationState") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateReconciledAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.ReconciledAt) { // not required - return nil - } - - if err := m.ReconciledAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("reconciledAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("reconciledAt") - } - return err - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Resources); i++ { - - if m.Resources[i] != nil { - - if swag.IsZero(m.Resources[i]) { // not required - return nil - } - - if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateSummary(ctx context.Context, formats strfmt.Registry) error { - - if m.Summary != nil { - - if swag.IsZero(m.Summary) { // not required - return nil - } - - if err := m.Summary.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("summary") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("summary") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ApplicationStatus) contextValidateSync(ctx context.Context, formats strfmt.Registry) error { - - if m.Sync != nil { - - if swag.IsZero(m.Sync) { // not required - return nil - } - - if err := m.Sync.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sync") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sync") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationStatus) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_summary.go b/pkg/argocd/models/v1alpha1_application_summary.go deleted file mode 100644 index 46fdf4c..0000000 --- a/pkg/argocd/models/v1alpha1_application_summary.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationSummary ApplicationSummary contains information about URLs and container images used by an application -// -// swagger:model v1alpha1ApplicationSummary -type V1alpha1ApplicationSummary struct { - - // ExternalURLs holds all external URLs of application child resources. - ExternalURLs []string `json:"externalURLs"` - - // Images holds all images of application child resources. - Images []string `json:"images"` -} - -// Validate validates this v1alpha1 application summary -func (m *V1alpha1ApplicationSummary) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 application summary based on context it is used -func (m *V1alpha1ApplicationSummary) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationSummary) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationSummary) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationSummary - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_tree.go b/pkg/argocd/models/v1alpha1_application_tree.go deleted file mode 100644 index 3e37e9d..0000000 --- a/pkg/argocd/models/v1alpha1_application_tree.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationTree ApplicationTree holds nodes which belongs to the application -// TODO: describe purpose of this type -// -// swagger:model v1alpha1ApplicationTree -type V1alpha1ApplicationTree struct { - - // Hosts holds list of Kubernetes nodes that run application related pods - Hosts []*V1alpha1HostInfo `json:"hosts"` - - // Nodes contains list of nodes which either directly managed by the application and children of directly managed nodes. - Nodes []*V1alpha1ResourceNode `json:"nodes"` - - // OrphanedNodes contains if or orphaned nodes: nodes which are not managed by the app but in the same namespace. List is populated only if orphaned resources enabled in app project. - OrphanedNodes []*V1alpha1ResourceNode `json:"orphanedNodes"` -} - -// Validate validates this v1alpha1 application tree -func (m *V1alpha1ApplicationTree) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNodes(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOrphanedNodes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationTree) validateHosts(formats strfmt.Registry) error { - if swag.IsZero(m.Hosts) { // not required - return nil - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationTree) validateNodes(formats strfmt.Registry) error { - if swag.IsZero(m.Nodes) { // not required - return nil - } - - for i := 0; i < len(m.Nodes); i++ { - if swag.IsZero(m.Nodes[i]) { // not required - continue - } - - if m.Nodes[i] != nil { - if err := m.Nodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationTree) validateOrphanedNodes(formats strfmt.Registry) error { - if swag.IsZero(m.OrphanedNodes) { // not required - return nil - } - - for i := 0; i < len(m.OrphanedNodes); i++ { - if swag.IsZero(m.OrphanedNodes[i]) { // not required - continue - } - - if m.OrphanedNodes[i] != nil { - if err := m.OrphanedNodes[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orphanedNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orphanedNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 application tree based on the context it is used -func (m *V1alpha1ApplicationTree) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHosts(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOrphanedNodes(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationTree) contextValidateHosts(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Hosts); i++ { - - if m.Hosts[i] != nil { - - if swag.IsZero(m.Hosts[i]) { // not required - return nil - } - - if err := m.Hosts[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationTree) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Nodes); i++ { - - if m.Nodes[i] != nil { - - if swag.IsZero(m.Nodes[i]) { // not required - return nil - } - - if err := m.Nodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("nodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("nodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ApplicationTree) contextValidateOrphanedNodes(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.OrphanedNodes); i++ { - - if m.OrphanedNodes[i] != nil { - - if swag.IsZero(m.OrphanedNodes[i]) { // not required - return nil - } - - if err := m.OrphanedNodes[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("orphanedNodes" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("orphanedNodes" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationTree) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationTree) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationTree - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_application_watch_event.go b/pkg/argocd/models/v1alpha1_application_watch_event.go deleted file mode 100644 index 1ffbcd7..0000000 --- a/pkg/argocd/models/v1alpha1_application_watch_event.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ApplicationWatchEvent ApplicationWatchEvent contains information about application change. -// -// swagger:model v1alpha1ApplicationWatchEvent -type V1alpha1ApplicationWatchEvent struct { - - // application - Application *V1alpha1Application `json:"application,omitempty"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this v1alpha1 application watch event -func (m *V1alpha1ApplicationWatchEvent) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApplication(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationWatchEvent) validateApplication(formats strfmt.Registry) error { - if swag.IsZero(m.Application) { // not required - return nil - } - - if m.Application != nil { - if err := m.Application.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("application") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("application") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 application watch event based on the context it is used -func (m *V1alpha1ApplicationWatchEvent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApplication(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ApplicationWatchEvent) contextValidateApplication(ctx context.Context, formats strfmt.Registry) error { - - if m.Application != nil { - - if swag.IsZero(m.Application) { // not required - return nil - } - - if err := m.Application.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("application") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("application") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ApplicationWatchEvent) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ApplicationWatchEvent) UnmarshalBinary(b []byte) error { - var res V1alpha1ApplicationWatchEvent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_backoff.go b/pkg/argocd/models/v1alpha1_backoff.go deleted file mode 100644 index ba67ee9..0000000 --- a/pkg/argocd/models/v1alpha1_backoff.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1Backoff Backoff is the backoff strategy to use on subsequent retries for failing syncs -// -// swagger:model v1alpha1Backoff -type V1alpha1Backoff struct { - - // Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") - Duration string `json:"duration,omitempty"` - - // Factor is a factor to multiply the base duration after each failed retry - Factor int64 `json:"factor,omitempty"` - - // MaxDuration is the maximum amount of time allowed for the backoff strategy - MaxDuration string `json:"maxDuration,omitempty"` -} - -// Validate validates this v1alpha1 backoff -func (m *V1alpha1Backoff) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 backoff based on context it is used -func (m *V1alpha1Backoff) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1Backoff) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1Backoff) UnmarshalBinary(b []byte) error { - var res V1alpha1Backoff - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_basic_auth_bitbucket_server.go b/pkg/argocd/models/v1alpha1_basic_auth_bitbucket_server.go deleted file mode 100644 index 2d38f6e..0000000 --- a/pkg/argocd/models/v1alpha1_basic_auth_bitbucket_server.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1BasicAuthBitbucketServer BasicAuthBitbucketServer defines the username/(password or personal access token) for Basic auth. -// -// swagger:model v1alpha1BasicAuthBitbucketServer -type V1alpha1BasicAuthBitbucketServer struct { - - // password ref - PasswordRef *V1alpha1SecretRef `json:"passwordRef,omitempty"` - - // Username for Basic auth - Username string `json:"username,omitempty"` -} - -// Validate validates this v1alpha1 basic auth bitbucket server -func (m *V1alpha1BasicAuthBitbucketServer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePasswordRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1BasicAuthBitbucketServer) validatePasswordRef(formats strfmt.Registry) error { - if swag.IsZero(m.PasswordRef) { // not required - return nil - } - - if m.PasswordRef != nil { - if err := m.PasswordRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 basic auth bitbucket server based on the context it is used -func (m *V1alpha1BasicAuthBitbucketServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidatePasswordRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1BasicAuthBitbucketServer) contextValidatePasswordRef(ctx context.Context, formats strfmt.Registry) error { - - if m.PasswordRef != nil { - - if swag.IsZero(m.PasswordRef) { // not required - return nil - } - - if err := m.PasswordRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("passwordRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("passwordRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1BasicAuthBitbucketServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1BasicAuthBitbucketServer) UnmarshalBinary(b []byte) error { - var res V1alpha1BasicAuthBitbucketServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_bearer_token_bitbucket_cloud.go b/pkg/argocd/models/v1alpha1_bearer_token_bitbucket_cloud.go deleted file mode 100644 index 0294b3d..0000000 --- a/pkg/argocd/models/v1alpha1_bearer_token_bitbucket_cloud.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1BearerTokenBitbucketCloud BearerTokenBitbucketCloud defines the Bearer token for BitBucket AppToken auth. -// -// swagger:model v1alpha1BearerTokenBitbucketCloud -type V1alpha1BearerTokenBitbucketCloud struct { - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` -} - -// Validate validates this v1alpha1 bearer token bitbucket cloud -func (m *V1alpha1BearerTokenBitbucketCloud) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1BearerTokenBitbucketCloud) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 bearer token bitbucket cloud based on the context it is used -func (m *V1alpha1BearerTokenBitbucketCloud) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1BearerTokenBitbucketCloud) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1BearerTokenBitbucketCloud) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1BearerTokenBitbucketCloud) UnmarshalBinary(b []byte) error { - var res V1alpha1BearerTokenBitbucketCloud - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_chart_details.go b/pkg/argocd/models/v1alpha1_chart_details.go deleted file mode 100644 index a1de462..0000000 --- a/pkg/argocd/models/v1alpha1_chart_details.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ChartDetails ChartDetails contains helm chart metadata for a specific version -// -// swagger:model v1alpha1ChartDetails -type V1alpha1ChartDetails struct { - - // description - Description string `json:"description,omitempty"` - - // The URL of this projects home page, e.g. "http://example.com" - Home string `json:"home,omitempty"` - - // List of maintainer details, name and email, e.g. ["John Doe "] - Maintainers []string `json:"maintainers"` -} - -// Validate validates this v1alpha1 chart details -func (m *V1alpha1ChartDetails) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 chart details based on context it is used -func (m *V1alpha1ChartDetails) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ChartDetails) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ChartDetails) UnmarshalBinary(b []byte) error { - var res V1alpha1ChartDetails - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_cluster.go b/pkg/argocd/models/v1alpha1_cluster.go deleted file mode 100644 index 9026baf..0000000 --- a/pkg/argocd/models/v1alpha1_cluster.go +++ /dev/null @@ -1,286 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1Cluster Cluster is the definition of a cluster resource -// -// swagger:model v1alpha1Cluster -type V1alpha1Cluster struct { - - // Annotations for cluster secret metadata - Annotations map[string]string `json:"annotations,omitempty"` - - // Indicates if cluster level resources should be managed. This setting is used only if cluster is connected in a namespaced mode. - ClusterResources bool `json:"clusterResources,omitempty"` - - // config - Config *V1alpha1ClusterConfig `json:"config,omitempty"` - - // connection state - ConnectionState *V1alpha1ConnectionState `json:"connectionState,omitempty"` - - // info - Info *V1alpha1ClusterInfo `json:"info,omitempty"` - - // Labels for cluster secret metadata - Labels map[string]string `json:"labels,omitempty"` - - // Name of the cluster. If omitted, will use the server address - Name string `json:"name,omitempty"` - - // Holds list of namespaces which are accessible in that cluster. Cluster level resources will be ignored if namespace list is not empty. - Namespaces []string `json:"namespaces"` - - // Reference between project and cluster that allow you automatically to be added as item inside Destinations project entity - Project string `json:"project,omitempty"` - - // refresh requested at - // Format: date-time - RefreshRequestedAt V1Time `json:"refreshRequestedAt,omitempty"` - - // Server is the API server URL of the Kubernetes cluster - Server string `json:"server,omitempty"` - - // DEPRECATED: use Info.ServerVersion field instead. - // The server version - ServerVersion string `json:"serverVersion,omitempty"` - - // Shard contains optional shard number. Calculated on the fly by the application controller if not specified. - Shard int64 `json:"shard,omitempty"` -} - -// Validate validates this v1alpha1 cluster -func (m *V1alpha1Cluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectionState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRefreshRequestedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Cluster) validateConfig(formats strfmt.Registry) error { - if swag.IsZero(m.Config) { // not required - return nil - } - - if m.Config != nil { - if err := m.Config.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Cluster) validateConnectionState(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionState) { // not required - return nil - } - - if m.ConnectionState != nil { - if err := m.ConnectionState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionState") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Cluster) validateInfo(formats strfmt.Registry) error { - if swag.IsZero(m.Info) { // not required - return nil - } - - if m.Info != nil { - if err := m.Info.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Cluster) validateRefreshRequestedAt(formats strfmt.Registry) error { - if swag.IsZero(m.RefreshRequestedAt) { // not required - return nil - } - - if err := m.RefreshRequestedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshRequestedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshRequestedAt") - } - return err - } - - return nil -} - -// ContextValidate validate this v1alpha1 cluster based on the context it is used -func (m *V1alpha1Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConnectionState(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRefreshRequestedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Cluster) contextValidateConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.Config != nil { - - if swag.IsZero(m.Config) { // not required - return nil - } - - if err := m.Config.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("config") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("config") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Cluster) contextValidateConnectionState(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectionState != nil { - - if swag.IsZero(m.ConnectionState) { // not required - return nil - } - - if err := m.ConnectionState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionState") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Cluster) contextValidateInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.Info != nil { - - if swag.IsZero(m.Info) { // not required - return nil - } - - if err := m.Info.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Cluster) contextValidateRefreshRequestedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.RefreshRequestedAt) { // not required - return nil - } - - if err := m.RefreshRequestedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("refreshRequestedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("refreshRequestedAt") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1Cluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1Cluster) UnmarshalBinary(b []byte) error { - var res V1alpha1Cluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_cluster_cache_info.go b/pkg/argocd/models/v1alpha1_cluster_cache_info.go deleted file mode 100644 index 67c0eb9..0000000 --- a/pkg/argocd/models/v1alpha1_cluster_cache_info.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ClusterCacheInfo ClusterCacheInfo contains information about the cluster cache -// -// swagger:model v1alpha1ClusterCacheInfo -type V1alpha1ClusterCacheInfo struct { - - // APIsCount holds number of observed Kubernetes API count - ApisCount int64 `json:"apisCount,omitempty"` - - // last cache sync time - // Format: date-time - LastCacheSyncTime V1Time `json:"lastCacheSyncTime,omitempty"` - - // ResourcesCount holds number of observed Kubernetes resources - ResourcesCount int64 `json:"resourcesCount,omitempty"` -} - -// Validate validates this v1alpha1 cluster cache info -func (m *V1alpha1ClusterCacheInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLastCacheSyncTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterCacheInfo) validateLastCacheSyncTime(formats strfmt.Registry) error { - if swag.IsZero(m.LastCacheSyncTime) { // not required - return nil - } - - if err := m.LastCacheSyncTime.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastCacheSyncTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastCacheSyncTime") - } - return err - } - - return nil -} - -// ContextValidate validate this v1alpha1 cluster cache info based on the context it is used -func (m *V1alpha1ClusterCacheInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLastCacheSyncTime(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterCacheInfo) contextValidateLastCacheSyncTime(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.LastCacheSyncTime) { // not required - return nil - } - - if err := m.LastCacheSyncTime.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("lastCacheSyncTime") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("lastCacheSyncTime") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ClusterCacheInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ClusterCacheInfo) UnmarshalBinary(b []byte) error { - var res V1alpha1ClusterCacheInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_cluster_config.go b/pkg/argocd/models/v1alpha1_cluster_config.go deleted file mode 100644 index 74886f1..0000000 --- a/pkg/argocd/models/v1alpha1_cluster_config.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ClusterConfig ClusterConfig is the configuration attributes. This structure is subset of the go-client -// rest.Config with annotations added for marshalling. -// -// swagger:model v1alpha1ClusterConfig -type V1alpha1ClusterConfig struct { - - // aws auth config - AwsAuthConfig *V1alpha1AWSAuthConfig `json:"awsAuthConfig,omitempty"` - - // Server requires Bearer authentication. This client will not attempt to use - // refresh tokens for an OAuth2 flow. - // TODO: demonstrate an OAuth2 compatible client. - BearerToken string `json:"bearerToken,omitempty"` - - // exec provider config - ExecProviderConfig *V1alpha1ExecProviderConfig `json:"execProviderConfig,omitempty"` - - // password - Password string `json:"password,omitempty"` - - // tls client config - TLSClientConfig *V1alpha1TLSClientConfig `json:"tlsClientConfig,omitempty"` - - // Server requires Basic authentication - Username string `json:"username,omitempty"` -} - -// Validate validates this v1alpha1 cluster config -func (m *V1alpha1ClusterConfig) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsAuthConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateExecProviderConfig(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTLSClientConfig(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterConfig) validateAwsAuthConfig(formats strfmt.Registry) error { - if swag.IsZero(m.AwsAuthConfig) { // not required - return nil - } - - if m.AwsAuthConfig != nil { - if err := m.AwsAuthConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsAuthConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsAuthConfig") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterConfig) validateExecProviderConfig(formats strfmt.Registry) error { - if swag.IsZero(m.ExecProviderConfig) { // not required - return nil - } - - if m.ExecProviderConfig != nil { - if err := m.ExecProviderConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("execProviderConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("execProviderConfig") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterConfig) validateTLSClientConfig(formats strfmt.Registry) error { - if swag.IsZero(m.TLSClientConfig) { // not required - return nil - } - - if m.TLSClientConfig != nil { - if err := m.TLSClientConfig.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tlsClientConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tlsClientConfig") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 cluster config based on the context it is used -func (m *V1alpha1ClusterConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsAuthConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateExecProviderConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTLSClientConfig(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterConfig) contextValidateAwsAuthConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsAuthConfig != nil { - - if swag.IsZero(m.AwsAuthConfig) { // not required - return nil - } - - if err := m.AwsAuthConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsAuthConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsAuthConfig") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterConfig) contextValidateExecProviderConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.ExecProviderConfig != nil { - - if swag.IsZero(m.ExecProviderConfig) { // not required - return nil - } - - if err := m.ExecProviderConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("execProviderConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("execProviderConfig") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterConfig) contextValidateTLSClientConfig(ctx context.Context, formats strfmt.Registry) error { - - if m.TLSClientConfig != nil { - - if swag.IsZero(m.TLSClientConfig) { // not required - return nil - } - - if err := m.TLSClientConfig.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tlsClientConfig") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tlsClientConfig") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ClusterConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ClusterConfig) UnmarshalBinary(b []byte) error { - var res V1alpha1ClusterConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_cluster_generator.go b/pkg/argocd/models/v1alpha1_cluster_generator.go deleted file mode 100644 index 991cc0f..0000000 --- a/pkg/argocd/models/v1alpha1_cluster_generator.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ClusterGenerator ClusterGenerator defines a generator to match against clusters registered with ArgoCD. -// -// swagger:model v1alpha1ClusterGenerator -type V1alpha1ClusterGenerator struct { - - // selector - Selector *V1LabelSelector `json:"selector,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` - - // Values contains key/value pairs which are passed directly as parameters to the template - Values map[string]string `json:"values,omitempty"` -} - -// Validate validates this v1alpha1 cluster generator -func (m *V1alpha1ClusterGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSelector(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterGenerator) validateSelector(formats strfmt.Registry) error { - if swag.IsZero(m.Selector) { // not required - return nil - } - - if m.Selector != nil { - if err := m.Selector.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 cluster generator based on the context it is used -func (m *V1alpha1ClusterGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSelector(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterGenerator) contextValidateSelector(ctx context.Context, formats strfmt.Registry) error { - - if m.Selector != nil { - - if swag.IsZero(m.Selector) { // not required - return nil - } - - if err := m.Selector.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("selector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("selector") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ClusterGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ClusterGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1ClusterGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_cluster_info.go b/pkg/argocd/models/v1alpha1_cluster_info.go deleted file mode 100644 index fceb597..0000000 --- a/pkg/argocd/models/v1alpha1_cluster_info.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ClusterInfo ClusterInfo contains information about the cluster -// -// swagger:model v1alpha1ClusterInfo -type V1alpha1ClusterInfo struct { - - // APIVersions contains list of API versions supported by the cluster - APIVersions []string `json:"apiVersions"` - - // ApplicationsCount is the number of applications managed by Argo CD on the cluster - ApplicationsCount int64 `json:"applicationsCount,omitempty"` - - // cache info - CacheInfo *V1alpha1ClusterCacheInfo `json:"cacheInfo,omitempty"` - - // connection state - ConnectionState *V1alpha1ConnectionState `json:"connectionState,omitempty"` - - // ServerVersion contains information about the Kubernetes version of the cluster - ServerVersion string `json:"serverVersion,omitempty"` -} - -// Validate validates this v1alpha1 cluster info -func (m *V1alpha1ClusterInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCacheInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateConnectionState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterInfo) validateCacheInfo(formats strfmt.Registry) error { - if swag.IsZero(m.CacheInfo) { // not required - return nil - } - - if m.CacheInfo != nil { - if err := m.CacheInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cacheInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cacheInfo") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterInfo) validateConnectionState(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionState) { // not required - return nil - } - - if m.ConnectionState != nil { - if err := m.ConnectionState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionState") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 cluster info based on the context it is used -func (m *V1alpha1ClusterInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCacheInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateConnectionState(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterInfo) contextValidateCacheInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.CacheInfo != nil { - - if swag.IsZero(m.CacheInfo) { // not required - return nil - } - - if err := m.CacheInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cacheInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("cacheInfo") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ClusterInfo) contextValidateConnectionState(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectionState != nil { - - if swag.IsZero(m.ConnectionState) { // not required - return nil - } - - if err := m.ConnectionState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionState") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ClusterInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ClusterInfo) UnmarshalBinary(b []byte) error { - var res V1alpha1ClusterInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_cluster_list.go b/pkg/argocd/models/v1alpha1_cluster_list.go deleted file mode 100644 index 1ae092b..0000000 --- a/pkg/argocd/models/v1alpha1_cluster_list.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ClusterList ClusterList is a collection of Clusters. -// -// swagger:model v1alpha1ClusterList -type V1alpha1ClusterList struct { - - // items - Items []*V1alpha1Cluster `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 cluster list -func (m *V1alpha1ClusterList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ClusterList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 cluster list based on the context it is used -func (m *V1alpha1ClusterList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ClusterList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ClusterList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ClusterList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ClusterList) UnmarshalBinary(b []byte) error { - var res V1alpha1ClusterList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_command.go b/pkg/argocd/models/v1alpha1_command.go deleted file mode 100644 index 7998529..0000000 --- a/pkg/argocd/models/v1alpha1_command.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1Command Command holds binary path and arguments list -// -// swagger:model v1alpha1Command -type V1alpha1Command struct { - - // args - Args []string `json:"args"` - - // command - Command []string `json:"command"` -} - -// Validate validates this v1alpha1 command -func (m *V1alpha1Command) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 command based on context it is used -func (m *V1alpha1Command) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1Command) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1Command) UnmarshalBinary(b []byte) error { - var res V1alpha1Command - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_compared_to.go b/pkg/argocd/models/v1alpha1_compared_to.go deleted file mode 100644 index 1c46600..0000000 --- a/pkg/argocd/models/v1alpha1_compared_to.go +++ /dev/null @@ -1,285 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ComparedTo ComparedTo contains application source and target which was used for resources comparison -// -// swagger:model v1alpha1ComparedTo -type V1alpha1ComparedTo struct { - - // destination - Destination *V1alpha1ApplicationDestination `json:"destination,omitempty"` - - // IgnoreDifferences is a reference to the application's ignored differences used for comparison - IgnoreDifferences []*V1alpha1ResourceIgnoreDifferences `json:"ignoreDifferences"` - - // source - Source *V1alpha1ApplicationSource `json:"source,omitempty"` - - // Sources is a reference to the application's multiple sources used for comparison - Sources []*V1alpha1ApplicationSource `json:"sources"` -} - -// Validate validates this v1alpha1 compared to -func (m *V1alpha1ComparedTo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDestination(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIgnoreDifferences(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ComparedTo) validateDestination(formats strfmt.Registry) error { - if swag.IsZero(m.Destination) { // not required - return nil - } - - if m.Destination != nil { - if err := m.Destination.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destination") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destination") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ComparedTo) validateIgnoreDifferences(formats strfmt.Registry) error { - if swag.IsZero(m.IgnoreDifferences) { // not required - return nil - } - - for i := 0; i < len(m.IgnoreDifferences); i++ { - if swag.IsZero(m.IgnoreDifferences[i]) { // not required - continue - } - - if m.IgnoreDifferences[i] != nil { - if err := m.IgnoreDifferences[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ComparedTo) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ComparedTo) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 compared to based on the context it is used -func (m *V1alpha1ComparedTo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDestination(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIgnoreDifferences(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ComparedTo) contextValidateDestination(ctx context.Context, formats strfmt.Registry) error { - - if m.Destination != nil { - - if swag.IsZero(m.Destination) { // not required - return nil - } - - if err := m.Destination.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("destination") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("destination") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ComparedTo) contextValidateIgnoreDifferences(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.IgnoreDifferences); i++ { - - if m.IgnoreDifferences[i] != nil { - - if swag.IsZero(m.IgnoreDifferences[i]) { // not required - return nil - } - - if err := m.IgnoreDifferences[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreDifferences" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ComparedTo) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ComparedTo) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ComparedTo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ComparedTo) UnmarshalBinary(b []byte) error { - var res V1alpha1ComparedTo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_config_management_plugin.go b/pkg/argocd/models/v1alpha1_config_management_plugin.go deleted file mode 100644 index b8d00d6..0000000 --- a/pkg/argocd/models/v1alpha1_config_management_plugin.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ConfigManagementPlugin ConfigManagementPlugin contains config management plugin configuration -// -// swagger:model v1alpha1ConfigManagementPlugin -type V1alpha1ConfigManagementPlugin struct { - - // generate - Generate *V1alpha1Command `json:"generate,omitempty"` - - // init - Init *V1alpha1Command `json:"init,omitempty"` - - // lock repo - LockRepo bool `json:"lockRepo,omitempty"` - - // name - Name string `json:"name,omitempty"` -} - -// Validate validates this v1alpha1 config management plugin -func (m *V1alpha1ConfigManagementPlugin) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGenerate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInit(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ConfigManagementPlugin) validateGenerate(formats strfmt.Registry) error { - if swag.IsZero(m.Generate) { // not required - return nil - } - - if m.Generate != nil { - if err := m.Generate.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generate") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ConfigManagementPlugin) validateInit(formats strfmt.Registry) error { - if swag.IsZero(m.Init) { // not required - return nil - } - - if m.Init != nil { - if err := m.Init.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("init") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("init") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 config management plugin based on the context it is used -func (m *V1alpha1ConfigManagementPlugin) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGenerate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInit(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ConfigManagementPlugin) contextValidateGenerate(ctx context.Context, formats strfmt.Registry) error { - - if m.Generate != nil { - - if swag.IsZero(m.Generate) { // not required - return nil - } - - if err := m.Generate.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generate") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generate") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ConfigManagementPlugin) contextValidateInit(ctx context.Context, formats strfmt.Registry) error { - - if m.Init != nil { - - if swag.IsZero(m.Init) { // not required - return nil - } - - if err := m.Init.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("init") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("init") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ConfigManagementPlugin) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ConfigManagementPlugin) UnmarshalBinary(b []byte) error { - var res V1alpha1ConfigManagementPlugin - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_connection_state.go b/pkg/argocd/models/v1alpha1_connection_state.go deleted file mode 100644 index 7fb36a5..0000000 --- a/pkg/argocd/models/v1alpha1_connection_state.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ConnectionState ConnectionState contains information about remote resource connection state, currently used for clusters and repositories -// -// swagger:model v1alpha1ConnectionState -type V1alpha1ConnectionState struct { - - // attempted at - // Format: date-time - AttemptedAt V1Time `json:"attemptedAt,omitempty"` - - // Message contains human readable information about the connection status - Message string `json:"message,omitempty"` - - // Status contains the current status indicator for the connection - Status string `json:"status,omitempty"` -} - -// Validate validates this v1alpha1 connection state -func (m *V1alpha1ConnectionState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAttemptedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ConnectionState) validateAttemptedAt(formats strfmt.Registry) error { - if swag.IsZero(m.AttemptedAt) { // not required - return nil - } - - if err := m.AttemptedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attemptedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attemptedAt") - } - return err - } - - return nil -} - -// ContextValidate validate this v1alpha1 connection state based on the context it is used -func (m *V1alpha1ConnectionState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAttemptedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ConnectionState) contextValidateAttemptedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.AttemptedAt) { // not required - return nil - } - - if err := m.AttemptedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("attemptedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("attemptedAt") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ConnectionState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ConnectionState) UnmarshalBinary(b []byte) error { - var res V1alpha1ConnectionState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_duck_type_generator.go b/pkg/argocd/models/v1alpha1_duck_type_generator.go deleted file mode 100644 index 37e3601..0000000 --- a/pkg/argocd/models/v1alpha1_duck_type_generator.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1DuckTypeGenerator DuckType defines a generator to match against clusters registered with ArgoCD. -// -// swagger:model v1alpha1DuckTypeGenerator -type V1alpha1DuckTypeGenerator struct { - - // ConfigMapRef is a ConfigMap with the duck type definitions needed to retrieve the data - // this includes apiVersion(group/version), kind, matchKey and validation settings - // Name is the resource name of the kind, group and version, defined in the ConfigMapRef - // RequeueAfterSeconds is how long before the duckType will be rechecked for a change - ConfigMapRef string `json:"configMapRef,omitempty"` - - // label selector - LabelSelector *V1LabelSelector `json:"labelSelector,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // requeue after seconds - RequeueAfterSeconds int64 `json:"requeueAfterSeconds,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` - - // Values contains key/value pairs which are passed directly as parameters to the template - Values map[string]string `json:"values,omitempty"` -} - -// Validate validates this v1alpha1 duck type generator -func (m *V1alpha1DuckTypeGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLabelSelector(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1DuckTypeGenerator) validateLabelSelector(formats strfmt.Registry) error { - if swag.IsZero(m.LabelSelector) { // not required - return nil - } - - if m.LabelSelector != nil { - if err := m.LabelSelector.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelSelector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelSelector") - } - return err - } - } - - return nil -} - -func (m *V1alpha1DuckTypeGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 duck type generator based on the context it is used -func (m *V1alpha1DuckTypeGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateLabelSelector(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1DuckTypeGenerator) contextValidateLabelSelector(ctx context.Context, formats strfmt.Registry) error { - - if m.LabelSelector != nil { - - if swag.IsZero(m.LabelSelector) { // not required - return nil - } - - if err := m.LabelSelector.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("labelSelector") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("labelSelector") - } - return err - } - } - - return nil -} - -func (m *V1alpha1DuckTypeGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1DuckTypeGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1DuckTypeGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1DuckTypeGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_exec_provider_config.go b/pkg/argocd/models/v1alpha1_exec_provider_config.go deleted file mode 100644 index c7bfc6b..0000000 --- a/pkg/argocd/models/v1alpha1_exec_provider_config.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ExecProviderConfig ExecProviderConfig is config used to call an external command to perform cluster authentication -// See: https://godoc.org/k8s.io/client-go/tools/clientcmd/api#ExecConfig -// -// swagger:model v1alpha1ExecProviderConfig -type V1alpha1ExecProviderConfig struct { - - // Preferred input version of the ExecInfo - APIVersion string `json:"apiVersion,omitempty"` - - // Arguments to pass to the command when executing it - Args []string `json:"args"` - - // Command to execute - Command string `json:"command,omitempty"` - - // Env defines additional environment variables to expose to the process - Env map[string]string `json:"env,omitempty"` - - // This text is shown to the user when the executable doesn't seem to be present - InstallHint string `json:"installHint,omitempty"` -} - -// Validate validates this v1alpha1 exec provider config -func (m *V1alpha1ExecProviderConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 exec provider config based on context it is used -func (m *V1alpha1ExecProviderConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ExecProviderConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ExecProviderConfig) UnmarshalBinary(b []byte) error { - var res V1alpha1ExecProviderConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_git_directory_generator_item.go b/pkg/argocd/models/v1alpha1_git_directory_generator_item.go deleted file mode 100644 index fb4ec27..0000000 --- a/pkg/argocd/models/v1alpha1_git_directory_generator_item.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1GitDirectoryGeneratorItem v1alpha1 git directory generator item -// -// swagger:model v1alpha1GitDirectoryGeneratorItem -type V1alpha1GitDirectoryGeneratorItem struct { - - // exclude - Exclude bool `json:"exclude,omitempty"` - - // path - Path string `json:"path,omitempty"` -} - -// Validate validates this v1alpha1 git directory generator item -func (m *V1alpha1GitDirectoryGeneratorItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 git directory generator item based on context it is used -func (m *V1alpha1GitDirectoryGeneratorItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1GitDirectoryGeneratorItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1GitDirectoryGeneratorItem) UnmarshalBinary(b []byte) error { - var res V1alpha1GitDirectoryGeneratorItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_git_file_generator_item.go b/pkg/argocd/models/v1alpha1_git_file_generator_item.go deleted file mode 100644 index fd01338..0000000 --- a/pkg/argocd/models/v1alpha1_git_file_generator_item.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1GitFileGeneratorItem v1alpha1 git file generator item -// -// swagger:model v1alpha1GitFileGeneratorItem -type V1alpha1GitFileGeneratorItem struct { - - // path - Path string `json:"path,omitempty"` -} - -// Validate validates this v1alpha1 git file generator item -func (m *V1alpha1GitFileGeneratorItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 git file generator item based on context it is used -func (m *V1alpha1GitFileGeneratorItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1GitFileGeneratorItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1GitFileGeneratorItem) UnmarshalBinary(b []byte) error { - var res V1alpha1GitFileGeneratorItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_git_generator.go b/pkg/argocd/models/v1alpha1_git_generator.go deleted file mode 100644 index c73e787..0000000 --- a/pkg/argocd/models/v1alpha1_git_generator.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1GitGenerator v1alpha1 git generator -// -// swagger:model v1alpha1GitGenerator -type V1alpha1GitGenerator struct { - - // directories - Directories []*V1alpha1GitDirectoryGeneratorItem `json:"directories"` - - // files - Files []*V1alpha1GitFileGeneratorItem `json:"files"` - - // path param prefix - PathParamPrefix string `json:"pathParamPrefix,omitempty"` - - // repo URL - RepoURL string `json:"repoURL,omitempty"` - - // requeue after seconds - RequeueAfterSeconds int64 `json:"requeueAfterSeconds,omitempty"` - - // revision - Revision string `json:"revision,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` - - // Values contains key/value pairs which are passed directly as parameters to the template - Values map[string]string `json:"values,omitempty"` -} - -// Validate validates this v1alpha1 git generator -func (m *V1alpha1GitGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDirectories(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFiles(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1GitGenerator) validateDirectories(formats strfmt.Registry) error { - if swag.IsZero(m.Directories) { // not required - return nil - } - - for i := 0; i < len(m.Directories); i++ { - if swag.IsZero(m.Directories[i]) { // not required - continue - } - - if m.Directories[i] != nil { - if err := m.Directories[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1GitGenerator) validateFiles(formats strfmt.Registry) error { - if swag.IsZero(m.Files) { // not required - return nil - } - - for i := 0; i < len(m.Files); i++ { - if swag.IsZero(m.Files[i]) { // not required - continue - } - - if m.Files[i] != nil { - if err := m.Files[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1GitGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 git generator based on the context it is used -func (m *V1alpha1GitGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDirectories(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFiles(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1GitGenerator) contextValidateDirectories(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Directories); i++ { - - if m.Directories[i] != nil { - - if swag.IsZero(m.Directories[i]) { // not required - return nil - } - - if err := m.Directories[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("directories" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("directories" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1GitGenerator) contextValidateFiles(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Files); i++ { - - if m.Files[i] != nil { - - if swag.IsZero(m.Files[i]) { // not required - return nil - } - - if err := m.Files[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("files" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1GitGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1GitGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1GitGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1GitGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_gnu_p_g_public_key.go b/pkg/argocd/models/v1alpha1_gnu_p_g_public_key.go deleted file mode 100644 index 13a2885..0000000 --- a/pkg/argocd/models/v1alpha1_gnu_p_g_public_key.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1GnuPGPublicKey GnuPGPublicKey is a representation of a GnuPG public key -// -// swagger:model v1alpha1GnuPGPublicKey -type V1alpha1GnuPGPublicKey struct { - - // Fingerprint is the fingerprint of the key - Fingerprint string `json:"fingerprint,omitempty"` - - // KeyData holds the raw key data, in base64 encoded format - KeyData string `json:"keyData,omitempty"` - - // KeyID specifies the key ID, in hexadecimal string format - KeyID string `json:"keyID,omitempty"` - - // Owner holds the owner identification, e.g. a name and e-mail address - Owner string `json:"owner,omitempty"` - - // SubType holds the key's sub type (e.g. rsa4096) - SubType string `json:"subType,omitempty"` - - // Trust holds the level of trust assigned to this key - Trust string `json:"trust,omitempty"` -} - -// Validate validates this v1alpha1 gnu p g public key -func (m *V1alpha1GnuPGPublicKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 gnu p g public key based on context it is used -func (m *V1alpha1GnuPGPublicKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1GnuPGPublicKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1GnuPGPublicKey) UnmarshalBinary(b []byte) error { - var res V1alpha1GnuPGPublicKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_gnu_p_g_public_key_list.go b/pkg/argocd/models/v1alpha1_gnu_p_g_public_key_list.go deleted file mode 100644 index 3f52929..0000000 --- a/pkg/argocd/models/v1alpha1_gnu_p_g_public_key_list.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1GnuPGPublicKeyList GnuPGPublicKeyList is a collection of GnuPGPublicKey objects -// -// swagger:model v1alpha1GnuPGPublicKeyList -type V1alpha1GnuPGPublicKeyList struct { - - // items - Items []*V1alpha1GnuPGPublicKey `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 gnu p g public key list -func (m *V1alpha1GnuPGPublicKeyList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1GnuPGPublicKeyList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1GnuPGPublicKeyList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 gnu p g public key list based on the context it is used -func (m *V1alpha1GnuPGPublicKeyList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1GnuPGPublicKeyList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1GnuPGPublicKeyList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1GnuPGPublicKeyList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1GnuPGPublicKeyList) UnmarshalBinary(b []byte) error { - var res V1alpha1GnuPGPublicKeyList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_health_status.go b/pkg/argocd/models/v1alpha1_health_status.go deleted file mode 100644 index 8a9941a..0000000 --- a/pkg/argocd/models/v1alpha1_health_status.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1HealthStatus HealthStatus contains information about the currently observed health state of an application or resource -// -// swagger:model v1alpha1HealthStatus -type V1alpha1HealthStatus struct { - - // Message is a human-readable informational message describing the health status - Message string `json:"message,omitempty"` - - // Status holds the status code of the application or resource - Status string `json:"status,omitempty"` -} - -// Validate validates this v1alpha1 health status -func (m *V1alpha1HealthStatus) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 health status based on context it is used -func (m *V1alpha1HealthStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1HealthStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1HealthStatus) UnmarshalBinary(b []byte) error { - var res V1alpha1HealthStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_helm_file_parameter.go b/pkg/argocd/models/v1alpha1_helm_file_parameter.go deleted file mode 100644 index 1fede03..0000000 --- a/pkg/argocd/models/v1alpha1_helm_file_parameter.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1HelmFileParameter HelmFileParameter is a file parameter that's passed to helm template during manifest generation -// -// swagger:model v1alpha1HelmFileParameter -type V1alpha1HelmFileParameter struct { - - // Name is the name of the Helm parameter - Name string `json:"name,omitempty"` - - // Path is the path to the file containing the values for the Helm parameter - Path string `json:"path,omitempty"` -} - -// Validate validates this v1alpha1 helm file parameter -func (m *V1alpha1HelmFileParameter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 helm file parameter based on context it is used -func (m *V1alpha1HelmFileParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1HelmFileParameter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1HelmFileParameter) UnmarshalBinary(b []byte) error { - var res V1alpha1HelmFileParameter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_helm_parameter.go b/pkg/argocd/models/v1alpha1_helm_parameter.go deleted file mode 100644 index ff25fda..0000000 --- a/pkg/argocd/models/v1alpha1_helm_parameter.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1HelmParameter HelmParameter is a parameter that's passed to helm template during manifest generation -// -// swagger:model v1alpha1HelmParameter -type V1alpha1HelmParameter struct { - - // ForceString determines whether to tell Helm to interpret booleans and numbers as strings - ForceString bool `json:"forceString,omitempty"` - - // Name is the name of the Helm parameter - Name string `json:"name,omitempty"` - - // Value is the value for the Helm parameter - Value string `json:"value,omitempty"` -} - -// Validate validates this v1alpha1 helm parameter -func (m *V1alpha1HelmParameter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 helm parameter based on context it is used -func (m *V1alpha1HelmParameter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1HelmParameter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1HelmParameter) UnmarshalBinary(b []byte) error { - var res V1alpha1HelmParameter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_host_info.go b/pkg/argocd/models/v1alpha1_host_info.go deleted file mode 100644 index aa7b418..0000000 --- a/pkg/argocd/models/v1alpha1_host_info.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1HostInfo HostInfo holds host name and resources metrics -// TODO: describe purpose of this type -// TODO: describe members of this type -// -// swagger:model v1alpha1HostInfo -type V1alpha1HostInfo struct { - - // name - Name string `json:"name,omitempty"` - - // resources info - ResourcesInfo []*V1alpha1HostResourceInfo `json:"resourcesInfo"` - - // system info - SystemInfo *V1NodeSystemInfo `json:"systemInfo,omitempty"` -} - -// Validate validates this v1alpha1 host info -func (m *V1alpha1HostInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResourcesInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSystemInfo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1HostInfo) validateResourcesInfo(formats strfmt.Registry) error { - if swag.IsZero(m.ResourcesInfo) { // not required - return nil - } - - for i := 0; i < len(m.ResourcesInfo); i++ { - if swag.IsZero(m.ResourcesInfo[i]) { // not required - continue - } - - if m.ResourcesInfo[i] != nil { - if err := m.ResourcesInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcesInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcesInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1HostInfo) validateSystemInfo(formats strfmt.Registry) error { - if swag.IsZero(m.SystemInfo) { // not required - return nil - } - - if m.SystemInfo != nil { - if err := m.SystemInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemInfo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 host info based on the context it is used -func (m *V1alpha1HostInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResourcesInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSystemInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1HostInfo) contextValidateResourcesInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ResourcesInfo); i++ { - - if m.ResourcesInfo[i] != nil { - - if swag.IsZero(m.ResourcesInfo[i]) { // not required - return nil - } - - if err := m.ResourcesInfo[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resourcesInfo" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resourcesInfo" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1HostInfo) contextValidateSystemInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.SystemInfo != nil { - - if swag.IsZero(m.SystemInfo) { // not required - return nil - } - - if err := m.SystemInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("systemInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("systemInfo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1HostInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1HostInfo) UnmarshalBinary(b []byte) error { - var res V1alpha1HostInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_host_resource_info.go b/pkg/argocd/models/v1alpha1_host_resource_info.go deleted file mode 100644 index c9b276b..0000000 --- a/pkg/argocd/models/v1alpha1_host_resource_info.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1HostResourceInfo TODO: describe this type -// -// swagger:model v1alpha1HostResourceInfo -type V1alpha1HostResourceInfo struct { - - // capacity - Capacity int64 `json:"capacity,omitempty"` - - // requested by app - RequestedByApp int64 `json:"requestedByApp,omitempty"` - - // requested by neighbors - RequestedByNeighbors int64 `json:"requestedByNeighbors,omitempty"` - - // resource name - ResourceName string `json:"resourceName,omitempty"` -} - -// Validate validates this v1alpha1 host resource info -func (m *V1alpha1HostResourceInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 host resource info based on context it is used -func (m *V1alpha1HostResourceInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1HostResourceInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1HostResourceInfo) UnmarshalBinary(b []byte) error { - var res V1alpha1HostResourceInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_info.go b/pkg/argocd/models/v1alpha1_info.go deleted file mode 100644 index f12d35d..0000000 --- a/pkg/argocd/models/v1alpha1_info.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1Info v1alpha1 info -// -// swagger:model v1alpha1Info -type V1alpha1Info struct { - - // name - Name string `json:"name,omitempty"` - - // value - Value string `json:"value,omitempty"` -} - -// Validate validates this v1alpha1 info -func (m *V1alpha1Info) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 info based on context it is used -func (m *V1alpha1Info) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1Info) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1Info) UnmarshalBinary(b []byte) error { - var res V1alpha1Info - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_info_item.go b/pkg/argocd/models/v1alpha1_info_item.go deleted file mode 100644 index 55fff4c..0000000 --- a/pkg/argocd/models/v1alpha1_info_item.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1InfoItem InfoItem contains arbitrary, human readable information about an application -// -// swagger:model v1alpha1InfoItem -type V1alpha1InfoItem struct { - - // Name is a human readable title for this piece of information. - Name string `json:"name,omitempty"` - - // Value is human readable content. - Value string `json:"value,omitempty"` -} - -// Validate validates this v1alpha1 info item -func (m *V1alpha1InfoItem) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 info item based on context it is used -func (m *V1alpha1InfoItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1InfoItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1InfoItem) UnmarshalBinary(b []byte) error { - var res V1alpha1InfoItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_j_w_t_token.go b/pkg/argocd/models/v1alpha1_j_w_t_token.go deleted file mode 100644 index 692054b..0000000 --- a/pkg/argocd/models/v1alpha1_j_w_t_token.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1JWTToken JWTToken holds the issuedAt and expiresAt values of a token -// -// swagger:model v1alpha1JWTToken -type V1alpha1JWTToken struct { - - // exp - Exp int64 `json:"exp,omitempty"` - - // iat - Iat int64 `json:"iat,omitempty"` - - // id - ID string `json:"id,omitempty"` -} - -// Validate validates this v1alpha1 j w t token -func (m *V1alpha1JWTToken) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 j w t token based on context it is used -func (m *V1alpha1JWTToken) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1JWTToken) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1JWTToken) UnmarshalBinary(b []byte) error { - var res V1alpha1JWTToken - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_j_w_t_tokens.go b/pkg/argocd/models/v1alpha1_j_w_t_tokens.go deleted file mode 100644 index 63977b7..0000000 --- a/pkg/argocd/models/v1alpha1_j_w_t_tokens.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1JWTTokens JWTTokens represents a list of JWT tokens -// -// swagger:model v1alpha1JWTTokens -type V1alpha1JWTTokens struct { - - // items - Items []*V1alpha1JWTToken `json:"items"` -} - -// Validate validates this v1alpha1 j w t tokens -func (m *V1alpha1JWTTokens) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1JWTTokens) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 j w t tokens based on the context it is used -func (m *V1alpha1JWTTokens) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1JWTTokens) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1JWTTokens) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1JWTTokens) UnmarshalBinary(b []byte) error { - var res V1alpha1JWTTokens - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_jsonnet_var.go b/pkg/argocd/models/v1alpha1_jsonnet_var.go deleted file mode 100644 index fc2c1a5..0000000 --- a/pkg/argocd/models/v1alpha1_jsonnet_var.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1JsonnetVar JsonnetVar represents a variable to be passed to jsonnet during manifest generation -// -// swagger:model v1alpha1JsonnetVar -type V1alpha1JsonnetVar struct { - - // code - Code bool `json:"code,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // value - Value string `json:"value,omitempty"` -} - -// Validate validates this v1alpha1 jsonnet var -func (m *V1alpha1JsonnetVar) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 jsonnet var based on context it is used -func (m *V1alpha1JsonnetVar) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1JsonnetVar) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1JsonnetVar) UnmarshalBinary(b []byte) error { - var res V1alpha1JsonnetVar - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_known_type_field.go b/pkg/argocd/models/v1alpha1_known_type_field.go deleted file mode 100644 index bda1ccc..0000000 --- a/pkg/argocd/models/v1alpha1_known_type_field.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1KnownTypeField KnownTypeField contains mapping between CRD field and known Kubernetes type. -// This is mainly used for unit conversion in unknown resources (e.g. 0.1 == 100mi) -// TODO: Describe the members of this type -// -// swagger:model v1alpha1KnownTypeField -type V1alpha1KnownTypeField struct { - - // field - Field string `json:"field,omitempty"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this v1alpha1 known type field -func (m *V1alpha1KnownTypeField) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 known type field based on context it is used -func (m *V1alpha1KnownTypeField) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1KnownTypeField) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1KnownTypeField) UnmarshalBinary(b []byte) error { - var res V1alpha1KnownTypeField - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_kustomize_gvk.go b/pkg/argocd/models/v1alpha1_kustomize_gvk.go deleted file mode 100644 index 9616dfb..0000000 --- a/pkg/argocd/models/v1alpha1_kustomize_gvk.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1KustomizeGvk v1alpha1 kustomize gvk -// -// swagger:model v1alpha1KustomizeGvk -type V1alpha1KustomizeGvk struct { - - // group - Group string `json:"group,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this v1alpha1 kustomize gvk -func (m *V1alpha1KustomizeGvk) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 kustomize gvk based on context it is used -func (m *V1alpha1KustomizeGvk) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1KustomizeGvk) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1KustomizeGvk) UnmarshalBinary(b []byte) error { - var res V1alpha1KustomizeGvk - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_kustomize_options.go b/pkg/argocd/models/v1alpha1_kustomize_options.go deleted file mode 100644 index 967c194..0000000 --- a/pkg/argocd/models/v1alpha1_kustomize_options.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1KustomizeOptions KustomizeOptions are options for kustomize to use when building manifests -// -// swagger:model v1alpha1KustomizeOptions -type V1alpha1KustomizeOptions struct { - - // BinaryPath holds optional path to kustomize binary - BinaryPath string `json:"binaryPath,omitempty"` - - // BuildOptions is a string of build parameters to use when calling `kustomize build` - BuildOptions string `json:"buildOptions,omitempty"` -} - -// Validate validates this v1alpha1 kustomize options -func (m *V1alpha1KustomizeOptions) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 kustomize options based on context it is used -func (m *V1alpha1KustomizeOptions) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1KustomizeOptions) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1KustomizeOptions) UnmarshalBinary(b []byte) error { - var res V1alpha1KustomizeOptions - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_kustomize_patch.go b/pkg/argocd/models/v1alpha1_kustomize_patch.go deleted file mode 100644 index cae5602..0000000 --- a/pkg/argocd/models/v1alpha1_kustomize_patch.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1KustomizePatch v1alpha1 kustomize patch -// -// swagger:model v1alpha1KustomizePatch -type V1alpha1KustomizePatch struct { - - // options - Options map[string]bool `json:"options,omitempty"` - - // patch - Patch string `json:"patch,omitempty"` - - // path - Path string `json:"path,omitempty"` - - // target - Target *V1alpha1KustomizeSelector `json:"target,omitempty"` -} - -// Validate validates this v1alpha1 kustomize patch -func (m *V1alpha1KustomizePatch) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTarget(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizePatch) validateTarget(formats strfmt.Registry) error { - if swag.IsZero(m.Target) { // not required - return nil - } - - if m.Target != nil { - if err := m.Target.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("target") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 kustomize patch based on the context it is used -func (m *V1alpha1KustomizePatch) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTarget(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizePatch) contextValidateTarget(ctx context.Context, formats strfmt.Registry) error { - - if m.Target != nil { - - if swag.IsZero(m.Target) { // not required - return nil - } - - if err := m.Target.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("target") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("target") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1KustomizePatch) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1KustomizePatch) UnmarshalBinary(b []byte) error { - var res V1alpha1KustomizePatch - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_kustomize_replica.go b/pkg/argocd/models/v1alpha1_kustomize_replica.go deleted file mode 100644 index 2cce1a9..0000000 --- a/pkg/argocd/models/v1alpha1_kustomize_replica.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1KustomizeReplica v1alpha1 kustomize replica -// -// swagger:model v1alpha1KustomizeReplica -type V1alpha1KustomizeReplica struct { - - // count - Count *IntstrIntOrString `json:"count,omitempty"` - - // Name of Deployment or StatefulSet - Name string `json:"name,omitempty"` -} - -// Validate validates this v1alpha1 kustomize replica -func (m *V1alpha1KustomizeReplica) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCount(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizeReplica) validateCount(formats strfmt.Registry) error { - if swag.IsZero(m.Count) { // not required - return nil - } - - if m.Count != nil { - if err := m.Count.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("count") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("count") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 kustomize replica based on the context it is used -func (m *V1alpha1KustomizeReplica) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateCount(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizeReplica) contextValidateCount(ctx context.Context, formats strfmt.Registry) error { - - if m.Count != nil { - - if swag.IsZero(m.Count) { // not required - return nil - } - - if err := m.Count.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("count") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("count") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1KustomizeReplica) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1KustomizeReplica) UnmarshalBinary(b []byte) error { - var res V1alpha1KustomizeReplica - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_kustomize_res_id.go b/pkg/argocd/models/v1alpha1_kustomize_res_id.go deleted file mode 100644 index f08f069..0000000 --- a/pkg/argocd/models/v1alpha1_kustomize_res_id.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1KustomizeResID v1alpha1 kustomize res Id -// -// swagger:model v1alpha1KustomizeResId -type V1alpha1KustomizeResID struct { - - // gvk - Gvk *V1alpha1KustomizeGvk `json:"gvk,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // namespace - Namespace string `json:"namespace,omitempty"` -} - -// Validate validates this v1alpha1 kustomize res Id -func (m *V1alpha1KustomizeResID) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGvk(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizeResID) validateGvk(formats strfmt.Registry) error { - if swag.IsZero(m.Gvk) { // not required - return nil - } - - if m.Gvk != nil { - if err := m.Gvk.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gvk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gvk") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 kustomize res Id based on the context it is used -func (m *V1alpha1KustomizeResID) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGvk(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizeResID) contextValidateGvk(ctx context.Context, formats strfmt.Registry) error { - - if m.Gvk != nil { - - if swag.IsZero(m.Gvk) { // not required - return nil - } - - if err := m.Gvk.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gvk") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gvk") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1KustomizeResID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1KustomizeResID) UnmarshalBinary(b []byte) error { - var res V1alpha1KustomizeResID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_kustomize_selector.go b/pkg/argocd/models/v1alpha1_kustomize_selector.go deleted file mode 100644 index 571a75b..0000000 --- a/pkg/argocd/models/v1alpha1_kustomize_selector.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1KustomizeSelector v1alpha1 kustomize selector -// -// swagger:model v1alpha1KustomizeSelector -type V1alpha1KustomizeSelector struct { - - // annotation selector - AnnotationSelector string `json:"annotationSelector,omitempty"` - - // label selector - LabelSelector string `json:"labelSelector,omitempty"` - - // res Id - ResID *V1alpha1KustomizeResID `json:"resId,omitempty"` -} - -// Validate validates this v1alpha1 kustomize selector -func (m *V1alpha1KustomizeSelector) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizeSelector) validateResID(formats strfmt.Registry) error { - if swag.IsZero(m.ResID) { // not required - return nil - } - - if m.ResID != nil { - if err := m.ResID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resId") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 kustomize selector based on the context it is used -func (m *V1alpha1KustomizeSelector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResID(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1KustomizeSelector) contextValidateResID(ctx context.Context, formats strfmt.Registry) error { - - if m.ResID != nil { - - if swag.IsZero(m.ResID) { // not required - return nil - } - - if err := m.ResID.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resId") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resId") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1KustomizeSelector) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1KustomizeSelector) UnmarshalBinary(b []byte) error { - var res V1alpha1KustomizeSelector - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_list_generator.go b/pkg/argocd/models/v1alpha1_list_generator.go deleted file mode 100644 index e8d881d..0000000 --- a/pkg/argocd/models/v1alpha1_list_generator.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ListGenerator ListGenerator include items info -// -// swagger:model v1alpha1ListGenerator -type V1alpha1ListGenerator struct { - - // +kubebuilder:validation:Optional - Elements []*V1JSON `json:"elements"` - - // elements yaml - ElementsYaml string `json:"elementsYaml,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` -} - -// Validate validates this v1alpha1 list generator -func (m *V1alpha1ListGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateElements(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ListGenerator) validateElements(formats strfmt.Registry) error { - if swag.IsZero(m.Elements) { // not required - return nil - } - - for i := 0; i < len(m.Elements); i++ { - if swag.IsZero(m.Elements[i]) { // not required - continue - } - - if m.Elements[i] != nil { - if err := m.Elements[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elements" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elements" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ListGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 list generator based on the context it is used -func (m *V1alpha1ListGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateElements(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ListGenerator) contextValidateElements(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Elements); i++ { - - if m.Elements[i] != nil { - - if swag.IsZero(m.Elements[i]) { // not required - return nil - } - - if err := m.Elements[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("elements" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("elements" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ListGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ListGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ListGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1ListGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_managed_namespace_metadata.go b/pkg/argocd/models/v1alpha1_managed_namespace_metadata.go deleted file mode 100644 index 0606c02..0000000 --- a/pkg/argocd/models/v1alpha1_managed_namespace_metadata.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ManagedNamespaceMetadata v1alpha1 managed namespace metadata -// -// swagger:model v1alpha1ManagedNamespaceMetadata -type V1alpha1ManagedNamespaceMetadata struct { - - // annotations - Annotations map[string]string `json:"annotations,omitempty"` - - // labels - Labels map[string]string `json:"labels,omitempty"` -} - -// Validate validates this v1alpha1 managed namespace metadata -func (m *V1alpha1ManagedNamespaceMetadata) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 managed namespace metadata based on context it is used -func (m *V1alpha1ManagedNamespaceMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ManagedNamespaceMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ManagedNamespaceMetadata) UnmarshalBinary(b []byte) error { - var res V1alpha1ManagedNamespaceMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_matrix_generator.go b/pkg/argocd/models/v1alpha1_matrix_generator.go deleted file mode 100644 index 1474f64..0000000 --- a/pkg/argocd/models/v1alpha1_matrix_generator.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1MatrixGenerator MatrixGenerator generates the cartesian product of two sets of parameters. The parameters are defined by two nested -// generators. -// -// swagger:model v1alpha1MatrixGenerator -type V1alpha1MatrixGenerator struct { - - // generators - Generators []*V1alpha1ApplicationSetNestedGenerator `json:"generators"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` -} - -// Validate validates this v1alpha1 matrix generator -func (m *V1alpha1MatrixGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGenerators(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1MatrixGenerator) validateGenerators(formats strfmt.Registry) error { - if swag.IsZero(m.Generators) { // not required - return nil - } - - for i := 0; i < len(m.Generators); i++ { - if swag.IsZero(m.Generators[i]) { // not required - continue - } - - if m.Generators[i] != nil { - if err := m.Generators[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generators" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generators" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1MatrixGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 matrix generator based on the context it is used -func (m *V1alpha1MatrixGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGenerators(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1MatrixGenerator) contextValidateGenerators(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Generators); i++ { - - if m.Generators[i] != nil { - - if swag.IsZero(m.Generators[i]) { // not required - return nil - } - - if err := m.Generators[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generators" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generators" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1MatrixGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1MatrixGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1MatrixGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1MatrixGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_merge_generator.go b/pkg/argocd/models/v1alpha1_merge_generator.go deleted file mode 100644 index 3dbe740..0000000 --- a/pkg/argocd/models/v1alpha1_merge_generator.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1MergeGenerator MergeGenerator merges the output of two or more generators. Where the values for all specified merge keys are equal -// between two sets of generated parameters, the parameter sets will be merged with the parameters from the latter -// generator taking precedence. Parameter sets with merge keys not present in the base generator's params will be -// ignored. -// For example, if the first generator produced [{a: '1', b: '2'}, {c: '1', d: '1'}] and the second generator produced -// [{'a': 'override'}], the united parameters for merge keys = ['a'] would be -// [{a: 'override', b: '1'}, {c: '1', d: '1'}]. -// -// MergeGenerator supports template overriding. If a MergeGenerator is one of multiple top-level generators, its -// template will be merged with the top-level generator before the parameters are applied. -// -// swagger:model v1alpha1MergeGenerator -type V1alpha1MergeGenerator struct { - - // generators - Generators []*V1alpha1ApplicationSetNestedGenerator `json:"generators"` - - // merge keys - MergeKeys []string `json:"mergeKeys"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` -} - -// Validate validates this v1alpha1 merge generator -func (m *V1alpha1MergeGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateGenerators(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1MergeGenerator) validateGenerators(formats strfmt.Registry) error { - if swag.IsZero(m.Generators) { // not required - return nil - } - - for i := 0; i < len(m.Generators); i++ { - if swag.IsZero(m.Generators[i]) { // not required - continue - } - - if m.Generators[i] != nil { - if err := m.Generators[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generators" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generators" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1MergeGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 merge generator based on the context it is used -func (m *V1alpha1MergeGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateGenerators(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1MergeGenerator) contextValidateGenerators(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Generators); i++ { - - if m.Generators[i] != nil { - - if swag.IsZero(m.Generators[i]) { // not required - return nil - } - - if err := m.Generators[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("generators" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("generators" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1MergeGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1MergeGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1MergeGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1MergeGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_operation.go b/pkg/argocd/models/v1alpha1_operation.go deleted file mode 100644 index a591867..0000000 --- a/pkg/argocd/models/v1alpha1_operation.go +++ /dev/null @@ -1,274 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1Operation Operation contains information about a requested or running operation -// -// swagger:model v1alpha1Operation -type V1alpha1Operation struct { - - // Info is a list of informational items for this operation - Info []*V1alpha1Info `json:"info"` - - // initiated by - InitiatedBy *V1alpha1OperationInitiator `json:"initiatedBy,omitempty"` - - // retry - Retry *V1alpha1RetryStrategy `json:"retry,omitempty"` - - // sync - Sync *V1alpha1SyncOperation `json:"sync,omitempty"` -} - -// Validate validates this v1alpha1 operation -func (m *V1alpha1Operation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInitiatedBy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetry(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSync(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Operation) validateInfo(formats strfmt.Registry) error { - if swag.IsZero(m.Info) { // not required - return nil - } - - for i := 0; i < len(m.Info); i++ { - if swag.IsZero(m.Info[i]) { // not required - continue - } - - if m.Info[i] != nil { - if err := m.Info[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1Operation) validateInitiatedBy(formats strfmt.Registry) error { - if swag.IsZero(m.InitiatedBy) { // not required - return nil - } - - if m.InitiatedBy != nil { - if err := m.InitiatedBy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("initiatedBy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("initiatedBy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Operation) validateRetry(formats strfmt.Registry) error { - if swag.IsZero(m.Retry) { // not required - return nil - } - - if m.Retry != nil { - if err := m.Retry.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retry") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retry") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Operation) validateSync(formats strfmt.Registry) error { - if swag.IsZero(m.Sync) { // not required - return nil - } - - if m.Sync != nil { - if err := m.Sync.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sync") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sync") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 operation based on the context it is used -func (m *V1alpha1Operation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInitiatedBy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetry(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSync(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Operation) contextValidateInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Info); i++ { - - if m.Info[i] != nil { - - if swag.IsZero(m.Info[i]) { // not required - return nil - } - - if err := m.Info[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1Operation) contextValidateInitiatedBy(ctx context.Context, formats strfmt.Registry) error { - - if m.InitiatedBy != nil { - - if swag.IsZero(m.InitiatedBy) { // not required - return nil - } - - if err := m.InitiatedBy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("initiatedBy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("initiatedBy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Operation) contextValidateRetry(ctx context.Context, formats strfmt.Registry) error { - - if m.Retry != nil { - - if swag.IsZero(m.Retry) { // not required - return nil - } - - if err := m.Retry.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retry") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retry") - } - return err - } - } - - return nil -} - -func (m *V1alpha1Operation) contextValidateSync(ctx context.Context, formats strfmt.Registry) error { - - if m.Sync != nil { - - if swag.IsZero(m.Sync) { // not required - return nil - } - - if err := m.Sync.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sync") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sync") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1Operation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1Operation) UnmarshalBinary(b []byte) error { - var res V1alpha1Operation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_operation_initiator.go b/pkg/argocd/models/v1alpha1_operation_initiator.go deleted file mode 100644 index 989ee57..0000000 --- a/pkg/argocd/models/v1alpha1_operation_initiator.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1OperationInitiator OperationInitiator contains information about the initiator of an operation -// -// swagger:model v1alpha1OperationInitiator -type V1alpha1OperationInitiator struct { - - // Automated is set to true if operation was initiated automatically by the application controller. - Automated bool `json:"automated,omitempty"` - - // Username contains the name of a user who started operation - Username string `json:"username,omitempty"` -} - -// Validate validates this v1alpha1 operation initiator -func (m *V1alpha1OperationInitiator) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 operation initiator based on context it is used -func (m *V1alpha1OperationInitiator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1OperationInitiator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1OperationInitiator) UnmarshalBinary(b []byte) error { - var res V1alpha1OperationInitiator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_operation_state.go b/pkg/argocd/models/v1alpha1_operation_state.go deleted file mode 100644 index b468ec2..0000000 --- a/pkg/argocd/models/v1alpha1_operation_state.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1OperationState OperationState contains information about state of a running operation -// -// swagger:model v1alpha1OperationState -type V1alpha1OperationState struct { - - // finished at - // Format: date-time - FinishedAt V1Time `json:"finishedAt,omitempty"` - - // Message holds any pertinent messages when attempting to perform operation (typically errors). - Message string `json:"message,omitempty"` - - // operation - Operation *V1alpha1Operation `json:"operation,omitempty"` - - // Phase is the current phase of the operation - Phase string `json:"phase,omitempty"` - - // RetryCount contains time of operation retries - RetryCount int64 `json:"retryCount,omitempty"` - - // started at - // Format: date-time - StartedAt V1Time `json:"startedAt,omitempty"` - - // sync result - SyncResult *V1alpha1SyncOperationResult `json:"syncResult,omitempty"` -} - -// Validate validates this v1alpha1 operation state -func (m *V1alpha1OperationState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFinishedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyncResult(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1OperationState) validateFinishedAt(formats strfmt.Registry) error { - if swag.IsZero(m.FinishedAt) { // not required - return nil - } - - if err := m.FinishedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1OperationState) validateOperation(formats strfmt.Registry) error { - if swag.IsZero(m.Operation) { // not required - return nil - } - - if m.Operation != nil { - if err := m.Operation.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (m *V1alpha1OperationState) validateStartedAt(formats strfmt.Registry) error { - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := m.StartedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1OperationState) validateSyncResult(formats strfmt.Registry) error { - if swag.IsZero(m.SyncResult) { // not required - return nil - } - - if m.SyncResult != nil { - if err := m.SyncResult.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncResult") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncResult") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 operation state based on the context it is used -func (m *V1alpha1OperationState) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateFinishedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateOperation(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateStartedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyncResult(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1OperationState) contextValidateFinishedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.FinishedAt) { // not required - return nil - } - - if err := m.FinishedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("finishedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("finishedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1OperationState) contextValidateOperation(ctx context.Context, formats strfmt.Registry) error { - - if m.Operation != nil { - - if swag.IsZero(m.Operation) { // not required - return nil - } - - if err := m.Operation.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operation") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("operation") - } - return err - } - } - - return nil -} - -func (m *V1alpha1OperationState) contextValidateStartedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := m.StartedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("startedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("startedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1OperationState) contextValidateSyncResult(ctx context.Context, formats strfmt.Registry) error { - - if m.SyncResult != nil { - - if swag.IsZero(m.SyncResult) { // not required - return nil - } - - if err := m.SyncResult.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncResult") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncResult") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1OperationState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1OperationState) UnmarshalBinary(b []byte) error { - var res V1alpha1OperationState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_orphaned_resource_key.go b/pkg/argocd/models/v1alpha1_orphaned_resource_key.go deleted file mode 100644 index 7cfd4da..0000000 --- a/pkg/argocd/models/v1alpha1_orphaned_resource_key.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1OrphanedResourceKey OrphanedResourceKey is a reference to a resource to be ignored from -// -// swagger:model v1alpha1OrphanedResourceKey -type V1alpha1OrphanedResourceKey struct { - - // group - Group string `json:"group,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` - - // name - Name string `json:"name,omitempty"` -} - -// Validate validates this v1alpha1 orphaned resource key -func (m *V1alpha1OrphanedResourceKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 orphaned resource key based on context it is used -func (m *V1alpha1OrphanedResourceKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1OrphanedResourceKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1OrphanedResourceKey) UnmarshalBinary(b []byte) error { - var res V1alpha1OrphanedResourceKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_orphaned_resources_monitor_settings.go b/pkg/argocd/models/v1alpha1_orphaned_resources_monitor_settings.go deleted file mode 100644 index 3ade9f7..0000000 --- a/pkg/argocd/models/v1alpha1_orphaned_resources_monitor_settings.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1OrphanedResourcesMonitorSettings OrphanedResourcesMonitorSettings holds settings of orphaned resources monitoring -// -// swagger:model v1alpha1OrphanedResourcesMonitorSettings -type V1alpha1OrphanedResourcesMonitorSettings struct { - - // Ignore contains a list of resources that are to be excluded from orphaned resources monitoring - Ignore []*V1alpha1OrphanedResourceKey `json:"ignore"` - - // Warn indicates if warning condition should be created for apps which have orphaned resources - Warn bool `json:"warn,omitempty"` -} - -// Validate validates this v1alpha1 orphaned resources monitor settings -func (m *V1alpha1OrphanedResourcesMonitorSettings) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIgnore(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1OrphanedResourcesMonitorSettings) validateIgnore(formats strfmt.Registry) error { - if swag.IsZero(m.Ignore) { // not required - return nil - } - - for i := 0; i < len(m.Ignore); i++ { - if swag.IsZero(m.Ignore[i]) { // not required - continue - } - - if m.Ignore[i] != nil { - if err := m.Ignore[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignore" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignore" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 orphaned resources monitor settings based on the context it is used -func (m *V1alpha1OrphanedResourcesMonitorSettings) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIgnore(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1OrphanedResourcesMonitorSettings) contextValidateIgnore(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Ignore); i++ { - - if m.Ignore[i] != nil { - - if swag.IsZero(m.Ignore[i]) { // not required - return nil - } - - if err := m.Ignore[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignore" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignore" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1OrphanedResourcesMonitorSettings) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1OrphanedResourcesMonitorSettings) UnmarshalBinary(b []byte) error { - var res V1alpha1OrphanedResourcesMonitorSettings - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_override_ignore_diff.go b/pkg/argocd/models/v1alpha1_override_ignore_diff.go deleted file mode 100644 index a27bef5..0000000 --- a/pkg/argocd/models/v1alpha1_override_ignore_diff.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1OverrideIgnoreDiff OverrideIgnoreDiff contains configurations about how fields should be ignored during diffs between -// the desired state and live state -// -// swagger:model v1alpha1OverrideIgnoreDiff -type V1alpha1OverrideIgnoreDiff struct { - - // JSONPointers is a JSON path list following the format defined in RFC4627 (https://datatracker.ietf.org/doc/html/rfc6902#section-3) - JSONPointers []string `json:"jSONPointers"` - - // JQPathExpressions is a JQ path list that will be evaludated during the diff process - JqPathExpressions []string `json:"jqPathExpressions"` - - // ManagedFieldsManagers is a list of trusted managers. Fields mutated by those managers will take precedence over the - // desired state defined in the SCM and won't be displayed in diffs - ManagedFieldsManagers []string `json:"managedFieldsManagers"` -} - -// Validate validates this v1alpha1 override ignore diff -func (m *V1alpha1OverrideIgnoreDiff) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 override ignore diff based on context it is used -func (m *V1alpha1OverrideIgnoreDiff) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1OverrideIgnoreDiff) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1OverrideIgnoreDiff) UnmarshalBinary(b []byte) error { - var res V1alpha1OverrideIgnoreDiff - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_plugin_config_map_ref.go b/pkg/argocd/models/v1alpha1_plugin_config_map_ref.go deleted file mode 100644 index a4205ae..0000000 --- a/pkg/argocd/models/v1alpha1_plugin_config_map_ref.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PluginConfigMapRef v1alpha1 plugin config map ref -// -// swagger:model v1alpha1PluginConfigMapRef -type V1alpha1PluginConfigMapRef struct { - - // Name of the ConfigMap - Name string `json:"name,omitempty"` -} - -// Validate validates this v1alpha1 plugin config map ref -func (m *V1alpha1PluginConfigMapRef) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 plugin config map ref based on context it is used -func (m *V1alpha1PluginConfigMapRef) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PluginConfigMapRef) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PluginConfigMapRef) UnmarshalBinary(b []byte) error { - var res V1alpha1PluginConfigMapRef - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_plugin_generator.go b/pkg/argocd/models/v1alpha1_plugin_generator.go deleted file mode 100644 index 62e3f31..0000000 --- a/pkg/argocd/models/v1alpha1_plugin_generator.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PluginGenerator PluginGenerator defines connection info specific to Plugin. -// -// swagger:model v1alpha1PluginGenerator -type V1alpha1PluginGenerator struct { - - // config map ref - ConfigMapRef *V1alpha1PluginConfigMapRef `json:"configMapRef,omitempty"` - - // input - Input *V1alpha1PluginInput `json:"input,omitempty"` - - // RequeueAfterSeconds determines how long the ApplicationSet controller will wait before reconciling the ApplicationSet again. - RequeueAfterSeconds int64 `json:"requeueAfterSeconds,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` - - // Values contains key/value pairs which are passed directly as parameters to the template. These values will not be - // sent as parameters to the plugin. - Values map[string]string `json:"values,omitempty"` -} - -// Validate validates this v1alpha1 plugin generator -func (m *V1alpha1PluginGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConfigMapRef(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInput(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PluginGenerator) validateConfigMapRef(formats strfmt.Registry) error { - if swag.IsZero(m.ConfigMapRef) { // not required - return nil - } - - if m.ConfigMapRef != nil { - if err := m.ConfigMapRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configMapRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configMapRef") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PluginGenerator) validateInput(formats strfmt.Registry) error { - if swag.IsZero(m.Input) { // not required - return nil - } - - if m.Input != nil { - if err := m.Input.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("input") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("input") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PluginGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 plugin generator based on the context it is used -func (m *V1alpha1PluginGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConfigMapRef(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInput(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PluginGenerator) contextValidateConfigMapRef(ctx context.Context, formats strfmt.Registry) error { - - if m.ConfigMapRef != nil { - - if swag.IsZero(m.ConfigMapRef) { // not required - return nil - } - - if err := m.ConfigMapRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("configMapRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("configMapRef") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PluginGenerator) contextValidateInput(ctx context.Context, formats strfmt.Registry) error { - - if m.Input != nil { - - if swag.IsZero(m.Input) { // not required - return nil - } - - if err := m.Input.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("input") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("input") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PluginGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PluginGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PluginGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1PluginGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_plugin_input.go b/pkg/argocd/models/v1alpha1_plugin_input.go deleted file mode 100644 index 2b093f6..0000000 --- a/pkg/argocd/models/v1alpha1_plugin_input.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// V1alpha1PluginInput v1alpha1 plugin input -// -// swagger:model v1alpha1PluginInput -type V1alpha1PluginInput struct { - - // Parameters contains the information to pass to the plugin. It is a map. The keys must be strings, and the - // values can be any type. - Parameters map[string]V1JSON `json:"parameters,omitempty"` -} - -// Validate validates this v1alpha1 plugin input -func (m *V1alpha1PluginInput) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParameters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PluginInput) validateParameters(formats strfmt.Registry) error { - if swag.IsZero(m.Parameters) { // not required - return nil - } - - for k := range m.Parameters { - - if err := validate.Required("parameters"+"."+k, "body", m.Parameters[k]); err != nil { - return err - } - if val, ok := m.Parameters[k]; ok { - if err := val.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parameters" + "." + k) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parameters" + "." + k) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 plugin input based on the context it is used -func (m *V1alpha1PluginInput) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParameters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PluginInput) contextValidateParameters(ctx context.Context, formats strfmt.Registry) error { - - for k := range m.Parameters { - - if val, ok := m.Parameters[k]; ok { - if err := val.ContextValidate(ctx, formats); err != nil { - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PluginInput) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PluginInput) UnmarshalBinary(b []byte) error { - var res V1alpha1PluginInput - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_project_role.go b/pkg/argocd/models/v1alpha1_project_role.go deleted file mode 100644 index 74a0c82..0000000 --- a/pkg/argocd/models/v1alpha1_project_role.go +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ProjectRole ProjectRole represents a role that has access to a project -// -// swagger:model v1alpha1ProjectRole -type V1alpha1ProjectRole struct { - - // Description is a description of the role - Description string `json:"description,omitempty"` - - // Groups are a list of OIDC group claims bound to this role - Groups []string `json:"groups"` - - // JWTTokens are a list of generated JWT tokens bound to this role - JwtTokens []*V1alpha1JWTToken `json:"jwtTokens"` - - // Name is a name for this role - Name string `json:"name,omitempty"` - - // Policies Stores a list of casbin formatted strings that define access policies for the role in the project - Policies []string `json:"policies"` -} - -// Validate validates this v1alpha1 project role -func (m *V1alpha1ProjectRole) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateJwtTokens(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ProjectRole) validateJwtTokens(formats strfmt.Registry) error { - if swag.IsZero(m.JwtTokens) { // not required - return nil - } - - for i := 0; i < len(m.JwtTokens); i++ { - if swag.IsZero(m.JwtTokens[i]) { // not required - continue - } - - if m.JwtTokens[i] != nil { - if err := m.JwtTokens[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jwtTokens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jwtTokens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 project role based on the context it is used -func (m *V1alpha1ProjectRole) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateJwtTokens(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ProjectRole) contextValidateJwtTokens(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.JwtTokens); i++ { - - if m.JwtTokens[i] != nil { - - if swag.IsZero(m.JwtTokens[i]) { // not required - return nil - } - - if err := m.JwtTokens[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("jwtTokens" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("jwtTokens" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ProjectRole) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ProjectRole) UnmarshalBinary(b []byte) error { - var res V1alpha1ProjectRole - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator.go b/pkg/argocd/models/v1alpha1_pull_request_generator.go deleted file mode 100644 index 5ee4aa8..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator.go +++ /dev/null @@ -1,481 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGenerator PullRequestGenerator defines a generator that scrapes a PullRequest API to find candidate pull requests. -// -// swagger:model v1alpha1PullRequestGenerator -type V1alpha1PullRequestGenerator struct { - - // azuredevops - Azuredevops *V1alpha1PullRequestGeneratorAzureDevOps `json:"azuredevops,omitempty"` - - // bitbucket - Bitbucket *V1alpha1PullRequestGeneratorBitbucket `json:"bitbucket,omitempty"` - - // bitbucket server - BitbucketServer *V1alpha1PullRequestGeneratorBitbucketServer `json:"bitbucketServer,omitempty"` - - // Filters for which pull requests should be considered. - Filters []*V1alpha1PullRequestGeneratorFilter `json:"filters"` - - // gitea - Gitea *V1alpha1PullRequestGeneratorGitea `json:"gitea,omitempty"` - - // github - Github *V1alpha1PullRequestGeneratorGithub `json:"github,omitempty"` - - // gitlab - Gitlab *V1alpha1PullRequestGeneratorGitLab `json:"gitlab,omitempty"` - - // Standard parameters. - RequeueAfterSeconds int64 `json:"requeueAfterSeconds,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator -func (m *V1alpha1PullRequestGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAzuredevops(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBitbucket(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBitbucketServer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGitea(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGithub(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGitlab(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateAzuredevops(formats strfmt.Registry) error { - if swag.IsZero(m.Azuredevops) { // not required - return nil - } - - if m.Azuredevops != nil { - if err := m.Azuredevops.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azuredevops") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azuredevops") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateBitbucket(formats strfmt.Registry) error { - if swag.IsZero(m.Bitbucket) { // not required - return nil - } - - if m.Bitbucket != nil { - if err := m.Bitbucket.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucket") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateBitbucketServer(formats strfmt.Registry) error { - if swag.IsZero(m.BitbucketServer) { // not required - return nil - } - - if m.BitbucketServer != nil { - if err := m.BitbucketServer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucketServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucketServer") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateFilters(formats strfmt.Registry) error { - if swag.IsZero(m.Filters) { // not required - return nil - } - - for i := 0; i < len(m.Filters); i++ { - if swag.IsZero(m.Filters[i]) { // not required - continue - } - - if m.Filters[i] != nil { - if err := m.Filters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateGitea(formats strfmt.Registry) error { - if swag.IsZero(m.Gitea) { // not required - return nil - } - - if m.Gitea != nil { - if err := m.Gitea.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitea") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitea") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateGithub(formats strfmt.Registry) error { - if swag.IsZero(m.Github) { // not required - return nil - } - - if m.Github != nil { - if err := m.Github.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("github") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("github") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateGitlab(formats strfmt.Registry) error { - if swag.IsZero(m.Gitlab) { // not required - return nil - } - - if m.Gitlab != nil { - if err := m.Gitlab.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitlab") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitlab") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 pull request generator based on the context it is used -func (m *V1alpha1PullRequestGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAzuredevops(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBitbucket(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBitbucketServer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGitea(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGithub(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGitlab(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateAzuredevops(ctx context.Context, formats strfmt.Registry) error { - - if m.Azuredevops != nil { - - if swag.IsZero(m.Azuredevops) { // not required - return nil - } - - if err := m.Azuredevops.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azuredevops") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azuredevops") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateBitbucket(ctx context.Context, formats strfmt.Registry) error { - - if m.Bitbucket != nil { - - if swag.IsZero(m.Bitbucket) { // not required - return nil - } - - if err := m.Bitbucket.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucket") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateBitbucketServer(ctx context.Context, formats strfmt.Registry) error { - - if m.BitbucketServer != nil { - - if swag.IsZero(m.BitbucketServer) { // not required - return nil - } - - if err := m.BitbucketServer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucketServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucketServer") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Filters); i++ { - - if m.Filters[i] != nil { - - if swag.IsZero(m.Filters[i]) { // not required - return nil - } - - if err := m.Filters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateGitea(ctx context.Context, formats strfmt.Registry) error { - - if m.Gitea != nil { - - if swag.IsZero(m.Gitea) { // not required - return nil - } - - if err := m.Gitea.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitea") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitea") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateGithub(ctx context.Context, formats strfmt.Registry) error { - - if m.Github != nil { - - if swag.IsZero(m.Github) { // not required - return nil - } - - if err := m.Github.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("github") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("github") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateGitlab(ctx context.Context, formats strfmt.Registry) error { - - if m.Gitlab != nil { - - if swag.IsZero(m.Gitlab) { // not required - return nil - } - - if err := m.Gitlab.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitlab") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitlab") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator_azure_dev_ops.go b/pkg/argocd/models/v1alpha1_pull_request_generator_azure_dev_ops.go deleted file mode 100644 index af894d0..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator_azure_dev_ops.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGeneratorAzureDevOps PullRequestGeneratorAzureDevOps defines connection info specific to AzureDevOps. -// -// swagger:model v1alpha1PullRequestGeneratorAzureDevOps -type V1alpha1PullRequestGeneratorAzureDevOps struct { - - // The Azure DevOps API URL to talk to. If blank, use https://dev.azure.com/. - API string `json:"api,omitempty"` - - // Labels is used to filter the PRs that you want to target - Labels []string `json:"labels"` - - // Azure DevOps org to scan. Required. - Organization string `json:"organization,omitempty"` - - // Azure DevOps project name to scan. Required. - Project string `json:"project,omitempty"` - - // Azure DevOps repo name to scan. Required. - Repo string `json:"repo,omitempty"` - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator azure dev ops -func (m *V1alpha1PullRequestGeneratorAzureDevOps) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorAzureDevOps) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 pull request generator azure dev ops based on the context it is used -func (m *V1alpha1PullRequestGeneratorAzureDevOps) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorAzureDevOps) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorAzureDevOps) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorAzureDevOps) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGeneratorAzureDevOps - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator_bitbucket.go b/pkg/argocd/models/v1alpha1_pull_request_generator_bitbucket.go deleted file mode 100644 index d76a2b2..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator_bitbucket.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGeneratorBitbucket PullRequestGeneratorBitbucket defines connection info specific to Bitbucket. -// -// swagger:model v1alpha1PullRequestGeneratorBitbucket -type V1alpha1PullRequestGeneratorBitbucket struct { - - // The Bitbucket REST API URL to talk to. If blank, uses https://api.bitbucket.org/2.0. - API string `json:"api,omitempty"` - - // basic auth - BasicAuth *V1alpha1BasicAuthBitbucketServer `json:"basicAuth,omitempty"` - - // bearer token - BearerToken *V1alpha1BearerTokenBitbucketCloud `json:"bearerToken,omitempty"` - - // Workspace to scan. Required. - Owner string `json:"owner,omitempty"` - - // Repo name to scan. Required. - Repo string `json:"repo,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator bitbucket -func (m *V1alpha1PullRequestGeneratorBitbucket) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBasicAuth(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBearerToken(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorBitbucket) validateBasicAuth(formats strfmt.Registry) error { - if swag.IsZero(m.BasicAuth) { // not required - return nil - } - - if m.BasicAuth != nil { - if err := m.BasicAuth.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("basicAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("basicAuth") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGeneratorBitbucket) validateBearerToken(formats strfmt.Registry) error { - if swag.IsZero(m.BearerToken) { // not required - return nil - } - - if m.BearerToken != nil { - if err := m.BearerToken.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bearerToken") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bearerToken") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 pull request generator bitbucket based on the context it is used -func (m *V1alpha1PullRequestGeneratorBitbucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBasicAuth(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBearerToken(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorBitbucket) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - - if m.BasicAuth != nil { - - if swag.IsZero(m.BasicAuth) { // not required - return nil - } - - if err := m.BasicAuth.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("basicAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("basicAuth") - } - return err - } - } - - return nil -} - -func (m *V1alpha1PullRequestGeneratorBitbucket) contextValidateBearerToken(ctx context.Context, formats strfmt.Registry) error { - - if m.BearerToken != nil { - - if swag.IsZero(m.BearerToken) { // not required - return nil - } - - if err := m.BearerToken.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bearerToken") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bearerToken") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorBitbucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorBitbucket) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGeneratorBitbucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator_bitbucket_server.go b/pkg/argocd/models/v1alpha1_pull_request_generator_bitbucket_server.go deleted file mode 100644 index edd0ccb..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator_bitbucket_server.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGeneratorBitbucketServer PullRequestGeneratorBitbucketServer defines connection info specific to BitbucketServer. -// -// swagger:model v1alpha1PullRequestGeneratorBitbucketServer -type V1alpha1PullRequestGeneratorBitbucketServer struct { - - // The Bitbucket REST API URL to talk to e.g. https://bitbucket.org/rest Required. - API string `json:"api,omitempty"` - - // basic auth - BasicAuth *V1alpha1BasicAuthBitbucketServer `json:"basicAuth,omitempty"` - - // Project to scan. Required. - Project string `json:"project,omitempty"` - - // Repo name to scan. Required. - Repo string `json:"repo,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator bitbucket server -func (m *V1alpha1PullRequestGeneratorBitbucketServer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBasicAuth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorBitbucketServer) validateBasicAuth(formats strfmt.Registry) error { - if swag.IsZero(m.BasicAuth) { // not required - return nil - } - - if m.BasicAuth != nil { - if err := m.BasicAuth.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("basicAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("basicAuth") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 pull request generator bitbucket server based on the context it is used -func (m *V1alpha1PullRequestGeneratorBitbucketServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBasicAuth(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorBitbucketServer) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - - if m.BasicAuth != nil { - - if swag.IsZero(m.BasicAuth) { // not required - return nil - } - - if err := m.BasicAuth.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("basicAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("basicAuth") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorBitbucketServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorBitbucketServer) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGeneratorBitbucketServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator_filter.go b/pkg/argocd/models/v1alpha1_pull_request_generator_filter.go deleted file mode 100644 index e47a2f5..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator_filter.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGeneratorFilter PullRequestGeneratorFilter is a single pull request filter. -// If multiple filter types are set on a single struct, they will be AND'd together. All filters must -// pass for a pull request to be included. -// -// swagger:model v1alpha1PullRequestGeneratorFilter -type V1alpha1PullRequestGeneratorFilter struct { - - // branch match - BranchMatch string `json:"branchMatch,omitempty"` - - // target branch match - TargetBranchMatch string `json:"targetBranchMatch,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator filter -func (m *V1alpha1PullRequestGeneratorFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 pull request generator filter based on context it is used -func (m *V1alpha1PullRequestGeneratorFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorFilter) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGeneratorFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator_git_lab.go b/pkg/argocd/models/v1alpha1_pull_request_generator_git_lab.go deleted file mode 100644 index afefd7c..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator_git_lab.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGeneratorGitLab PullRequestGeneratorGitLab defines connection info specific to GitLab. -// -// swagger:model v1alpha1PullRequestGeneratorGitLab -type V1alpha1PullRequestGeneratorGitLab struct { - - // The GitLab API URL to talk to. If blank, uses https://gitlab.com/. - API string `json:"api,omitempty"` - - // Skips validating the SCM provider's TLS certificate - useful for self-signed certificates.; default: false - Insecure bool `json:"insecure,omitempty"` - - // Labels is used to filter the MRs that you want to target - Labels []string `json:"labels"` - - // GitLab project to scan. Required. - Project string `json:"project,omitempty"` - - // PullRequestState is an additional MRs filter to get only those with a certain state. Default: "" (all states) - PullRequestState string `json:"pullRequestState,omitempty"` - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator git lab -func (m *V1alpha1PullRequestGeneratorGitLab) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorGitLab) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 pull request generator git lab based on the context it is used -func (m *V1alpha1PullRequestGeneratorGitLab) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorGitLab) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorGitLab) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorGitLab) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGeneratorGitLab - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator_gitea.go b/pkg/argocd/models/v1alpha1_pull_request_generator_gitea.go deleted file mode 100644 index 18dcd4d..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator_gitea.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGeneratorGitea PullRequestGeneratorGitea defines connection info specific to Gitea. -// -// swagger:model v1alpha1PullRequestGeneratorGitea -type V1alpha1PullRequestGeneratorGitea struct { - - // The Gitea API URL to talk to. Required - API string `json:"api,omitempty"` - - // Allow insecure tls, for self-signed certificates; default: false. - Insecure bool `json:"insecure,omitempty"` - - // Gitea org or user to scan. Required. - Owner string `json:"owner,omitempty"` - - // Gitea repo name to scan. Required. - Repo string `json:"repo,omitempty"` - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator gitea -func (m *V1alpha1PullRequestGeneratorGitea) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorGitea) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 pull request generator gitea based on the context it is used -func (m *V1alpha1PullRequestGeneratorGitea) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorGitea) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorGitea) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorGitea) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGeneratorGitea - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_pull_request_generator_github.go b/pkg/argocd/models/v1alpha1_pull_request_generator_github.go deleted file mode 100644 index 0d80d2f..0000000 --- a/pkg/argocd/models/v1alpha1_pull_request_generator_github.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1PullRequestGeneratorGithub PullRequestGenerator defines connection info specific to GitHub. -// -// swagger:model v1alpha1PullRequestGeneratorGithub -type V1alpha1PullRequestGeneratorGithub struct { - - // The GitHub API URL to talk to. If blank, use https://api.github.com/. - API string `json:"api,omitempty"` - - // AppSecretName is a reference to a GitHub App repo-creds secret with permission to access pull requests. - AppSecretName string `json:"appSecretName,omitempty"` - - // Labels is used to filter the PRs that you want to target - Labels []string `json:"labels"` - - // GitHub org or user to scan. Required. - Owner string `json:"owner,omitempty"` - - // GitHub repo name to scan. Required. - Repo string `json:"repo,omitempty"` - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` -} - -// Validate validates this v1alpha1 pull request generator github -func (m *V1alpha1PullRequestGeneratorGithub) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorGithub) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 pull request generator github based on the context it is used -func (m *V1alpha1PullRequestGeneratorGithub) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1PullRequestGeneratorGithub) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorGithub) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1PullRequestGeneratorGithub) UnmarshalBinary(b []byte) error { - var res V1alpha1PullRequestGeneratorGithub - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_repo_creds.go b/pkg/argocd/models/v1alpha1_repo_creds.go deleted file mode 100644 index 4b5fa69..0000000 --- a/pkg/argocd/models/v1alpha1_repo_creds.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RepoCreds RepoCreds holds the definition for repository credentials -// -// swagger:model v1alpha1RepoCreds -type V1alpha1RepoCreds struct { - - // EnableOCI specifies whether helm-oci support should be enabled for this repo - EnableOCI bool `json:"enableOCI,omitempty"` - - // ForceHttpBasicAuth specifies whether Argo CD should attempt to force basic auth for HTTP connections - ForceHTTPBasicAuth bool `json:"forceHttpBasicAuth,omitempty"` - - // GCPServiceAccountKey specifies the service account key in JSON format to be used for getting credentials to Google Cloud Source repos - GcpServiceAccountKey string `json:"gcpServiceAccountKey,omitempty"` - - // GithubAppEnterpriseBaseURL specifies the GitHub API URL for GitHub app authentication. If empty will default to https://api.github.com - GithubAppEnterpriseBaseURL string `json:"githubAppEnterpriseBaseUrl,omitempty"` - - // GithubAppId specifies the Github App ID of the app used to access the repo for GitHub app authentication - GithubAppID int64 `json:"githubAppID,omitempty"` - - // GithubAppInstallationId specifies the ID of the installed GitHub App for GitHub app authentication - GithubAppInstallationID int64 `json:"githubAppInstallationID,omitempty"` - - // GithubAppPrivateKey specifies the private key PEM data for authentication via GitHub app - GithubAppPrivateKey string `json:"githubAppPrivateKey,omitempty"` - - // Password for authenticating at the repo server - Password string `json:"password,omitempty"` - - // Proxy specifies the HTTP/HTTPS proxy used to access repos at the repo server - Proxy string `json:"proxy,omitempty"` - - // SSHPrivateKey contains the private key data for authenticating at the repo server using SSH (only Git repos) - SSHPrivateKey string `json:"sshPrivateKey,omitempty"` - - // TLSClientCertData specifies the TLS client cert data for authenticating at the repo server - TLSClientCertData string `json:"tlsClientCertData,omitempty"` - - // TLSClientCertKey specifies the TLS client cert key for authenticating at the repo server - TLSClientCertKey string `json:"tlsClientCertKey,omitempty"` - - // Type specifies the type of the repoCreds. Can be either "git" or "helm. "git" is assumed if empty or absent. - Type string `json:"type,omitempty"` - - // URL is the URL to which these credentials match - URL string `json:"url,omitempty"` - - // Username for authenticating at the repo server - Username string `json:"username,omitempty"` -} - -// Validate validates this v1alpha1 repo creds -func (m *V1alpha1RepoCreds) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 repo creds based on context it is used -func (m *V1alpha1RepoCreds) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RepoCreds) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RepoCreds) UnmarshalBinary(b []byte) error { - var res V1alpha1RepoCreds - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_repo_creds_list.go b/pkg/argocd/models/v1alpha1_repo_creds_list.go deleted file mode 100644 index 7b849ac..0000000 --- a/pkg/argocd/models/v1alpha1_repo_creds_list.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RepoCredsList RepositoryList is a collection of Repositories. -// -// swagger:model v1alpha1RepoCredsList -type V1alpha1RepoCredsList struct { - - // items - Items []*V1alpha1RepoCreds `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 repo creds list -func (m *V1alpha1RepoCredsList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RepoCredsList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1RepoCredsList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 repo creds list based on the context it is used -func (m *V1alpha1RepoCredsList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RepoCredsList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1RepoCredsList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RepoCredsList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RepoCredsList) UnmarshalBinary(b []byte) error { - var res V1alpha1RepoCredsList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_repository.go b/pkg/argocd/models/v1alpha1_repository.go deleted file mode 100644 index 5fdee51..0000000 --- a/pkg/argocd/models/v1alpha1_repository.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1Repository Repository is a repository holding application configurations -// -// swagger:model v1alpha1Repository -type V1alpha1Repository struct { - - // connection state - ConnectionState *V1alpha1ConnectionState `json:"connectionState,omitempty"` - - // EnableLFS specifies whether git-lfs support should be enabled for this repo. Only valid for Git repositories. - EnableLfs bool `json:"enableLfs,omitempty"` - - // EnableOCI specifies whether helm-oci support should be enabled for this repo - EnableOCI bool `json:"enableOCI,omitempty"` - - // ForceHttpBasicAuth specifies whether Argo CD should attempt to force basic auth for HTTP connections - ForceHTTPBasicAuth bool `json:"forceHttpBasicAuth,omitempty"` - - // GCPServiceAccountKey specifies the service account key in JSON format to be used for getting credentials to Google Cloud Source repos - GcpServiceAccountKey string `json:"gcpServiceAccountKey,omitempty"` - - // GithubAppEnterpriseBaseURL specifies the base URL of GitHub Enterprise installation. If empty will default to https://api.github.com - GithubAppEnterpriseBaseURL string `json:"githubAppEnterpriseBaseUrl,omitempty"` - - // GithubAppId specifies the ID of the GitHub app used to access the repo - GithubAppID int64 `json:"githubAppID,omitempty"` - - // GithubAppInstallationId specifies the installation ID of the GitHub App used to access the repo - GithubAppInstallationID int64 `json:"githubAppInstallationID,omitempty"` - - // Github App Private Key PEM data - GithubAppPrivateKey string `json:"githubAppPrivateKey,omitempty"` - - // Whether credentials were inherited from a credential set - InheritedCreds bool `json:"inheritedCreds,omitempty"` - - // Insecure specifies whether the connection to the repository ignores any errors when verifying TLS certificates or SSH host keys - Insecure bool `json:"insecure,omitempty"` - - // InsecureIgnoreHostKey should not be used anymore, Insecure is favoured - // Used only for Git repos - InsecureIgnoreHostKey bool `json:"insecureIgnoreHostKey,omitempty"` - - // Name specifies a name to be used for this repo. Only used with Helm repos - Name string `json:"name,omitempty"` - - // Password contains the password or PAT used for authenticating at the remote repository - Password string `json:"password,omitempty"` - - // Reference between project and repository that allows it to be automatically added as an item inside SourceRepos project entity - Project string `json:"project,omitempty"` - - // Proxy specifies the HTTP/HTTPS proxy used to access the repo - Proxy string `json:"proxy,omitempty"` - - // Repo contains the URL to the remote repository - Repo string `json:"repo,omitempty"` - - // SSHPrivateKey contains the PEM data for authenticating at the repo server. Only used with Git repos. - SSHPrivateKey string `json:"sshPrivateKey,omitempty"` - - // TLSClientCertData contains a certificate in PEM format for authenticating at the repo server - TLSClientCertData string `json:"tlsClientCertData,omitempty"` - - // TLSClientCertKey contains a private key in PEM format for authenticating at the repo server - TLSClientCertKey string `json:"tlsClientCertKey,omitempty"` - - // Type specifies the type of the repo. Can be either "git" or "helm. "git" is assumed if empty or absent. - Type string `json:"type,omitempty"` - - // Username contains the user name used for authenticating at the remote repository - Username string `json:"username,omitempty"` -} - -// Validate validates this v1alpha1 repository -func (m *V1alpha1Repository) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateConnectionState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Repository) validateConnectionState(formats strfmt.Registry) error { - if swag.IsZero(m.ConnectionState) { // not required - return nil - } - - if m.ConnectionState != nil { - if err := m.ConnectionState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionState") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 repository based on the context it is used -func (m *V1alpha1Repository) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateConnectionState(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1Repository) contextValidateConnectionState(ctx context.Context, formats strfmt.Registry) error { - - if m.ConnectionState != nil { - - if swag.IsZero(m.ConnectionState) { // not required - return nil - } - - if err := m.ConnectionState.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("connectionState") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("connectionState") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1Repository) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1Repository) UnmarshalBinary(b []byte) error { - var res V1alpha1Repository - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_repository_certificate.go b/pkg/argocd/models/v1alpha1_repository_certificate.go deleted file mode 100644 index dcae981..0000000 --- a/pkg/argocd/models/v1alpha1_repository_certificate.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RepositoryCertificate A RepositoryCertificate is either SSH known hosts entry or TLS certificate -// -// swagger:model v1alpha1RepositoryCertificate -type V1alpha1RepositoryCertificate struct { - - // CertData contains the actual certificate data, dependent on the certificate type - // Format: byte - CertData strfmt.Base64 `json:"certData,omitempty"` - - // CertInfo will hold additional certificate info, depdendent on the certificate type (e.g. SSH fingerprint, X509 CommonName) - CertInfo string `json:"certInfo,omitempty"` - - // CertSubType specifies the sub type of the cert, i.e. "ssh-rsa" - CertSubType string `json:"certSubType,omitempty"` - - // CertType specifies the type of the certificate - currently one of "https" or "ssh" - CertType string `json:"certType,omitempty"` - - // ServerName specifies the DNS name of the server this certificate is intended for - ServerName string `json:"serverName,omitempty"` -} - -// Validate validates this v1alpha1 repository certificate -func (m *V1alpha1RepositoryCertificate) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 repository certificate based on context it is used -func (m *V1alpha1RepositoryCertificate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RepositoryCertificate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RepositoryCertificate) UnmarshalBinary(b []byte) error { - var res V1alpha1RepositoryCertificate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_repository_certificate_list.go b/pkg/argocd/models/v1alpha1_repository_certificate_list.go deleted file mode 100644 index 2da4539..0000000 --- a/pkg/argocd/models/v1alpha1_repository_certificate_list.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RepositoryCertificateList RepositoryCertificateList is a collection of RepositoryCertificates -// -// swagger:model v1alpha1RepositoryCertificateList -type V1alpha1RepositoryCertificateList struct { - - // List of certificates to be processed - Items []*V1alpha1RepositoryCertificate `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 repository certificate list -func (m *V1alpha1RepositoryCertificateList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RepositoryCertificateList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1RepositoryCertificateList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 repository certificate list based on the context it is used -func (m *V1alpha1RepositoryCertificateList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RepositoryCertificateList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1RepositoryCertificateList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RepositoryCertificateList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RepositoryCertificateList) UnmarshalBinary(b []byte) error { - var res V1alpha1RepositoryCertificateList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_repository_list.go b/pkg/argocd/models/v1alpha1_repository_list.go deleted file mode 100644 index f606fd2..0000000 --- a/pkg/argocd/models/v1alpha1_repository_list.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RepositoryList RepositoryList is a collection of Repositories. -// -// swagger:model v1alpha1RepositoryList -type V1alpha1RepositoryList struct { - - // items - Items []*V1alpha1Repository `json:"items"` - - // metadata - Metadata *V1ListMeta `json:"metadata,omitempty"` -} - -// Validate validates this v1alpha1 repository list -func (m *V1alpha1RepositoryList) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateItems(formats); err != nil { - res = append(res, err) - } - - if err := m.validateMetadata(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RepositoryList) validateItems(formats strfmt.Registry) error { - if swag.IsZero(m.Items) { // not required - return nil - } - - for i := 0; i < len(m.Items); i++ { - if swag.IsZero(m.Items[i]) { // not required - continue - } - - if m.Items[i] != nil { - if err := m.Items[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1RepositoryList) validateMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if m.Metadata != nil { - if err := m.Metadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 repository list based on the context it is used -func (m *V1alpha1RepositoryList) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateItems(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RepositoryList) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Items); i++ { - - if m.Items[i] != nil { - - if swag.IsZero(m.Items[i]) { // not required - return nil - } - - if err := m.Items[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("items" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("items" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1RepositoryList) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.Metadata != nil { - - if swag.IsZero(m.Metadata) { // not required - return nil - } - - if err := m.Metadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("metadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("metadata") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RepositoryList) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RepositoryList) UnmarshalBinary(b []byte) error { - var res V1alpha1RepositoryList - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_action.go b/pkg/argocd/models/v1alpha1_resource_action.go deleted file mode 100644 index 9d9413a..0000000 --- a/pkg/argocd/models/v1alpha1_resource_action.go +++ /dev/null @@ -1,134 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceAction TODO: describe this type -// TODO: describe members of this type -// -// swagger:model v1alpha1ResourceAction -type V1alpha1ResourceAction struct { - - // disabled - Disabled bool `json:"disabled,omitempty"` - - // display name - DisplayName string `json:"displayName,omitempty"` - - // icon class - IconClass string `json:"iconClass,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // params - Params []*V1alpha1ResourceActionParam `json:"params"` -} - -// Validate validates this v1alpha1 resource action -func (m *V1alpha1ResourceAction) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceAction) validateParams(formats strfmt.Registry) error { - if swag.IsZero(m.Params) { // not required - return nil - } - - for i := 0; i < len(m.Params); i++ { - if swag.IsZero(m.Params[i]) { // not required - continue - } - - if m.Params[i] != nil { - if err := m.Params[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 resource action based on the context it is used -func (m *V1alpha1ResourceAction) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceAction) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Params); i++ { - - if m.Params[i] != nil { - - if swag.IsZero(m.Params[i]) { // not required - return nil - } - - if err := m.Params[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("params" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("params" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceAction) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceAction) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceAction - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_action_param.go b/pkg/argocd/models/v1alpha1_resource_action_param.go deleted file mode 100644 index b6b8d18..0000000 --- a/pkg/argocd/models/v1alpha1_resource_action_param.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceActionParam TODO: describe this type -// TODO: describe members of this type -// -// swagger:model v1alpha1ResourceActionParam -type V1alpha1ResourceActionParam struct { - - // default - Default string `json:"default,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // type - Type string `json:"type,omitempty"` - - // value - Value string `json:"value,omitempty"` -} - -// Validate validates this v1alpha1 resource action param -func (m *V1alpha1ResourceActionParam) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 resource action param based on context it is used -func (m *V1alpha1ResourceActionParam) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceActionParam) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceActionParam) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceActionParam - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_diff.go b/pkg/argocd/models/v1alpha1_resource_diff.go deleted file mode 100644 index bfacda0..0000000 --- a/pkg/argocd/models/v1alpha1_resource_diff.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceDiff ResourceDiff holds the diff of a live and target resource object -// TODO: describe members of this type -// -// swagger:model v1alpha1ResourceDiff -type V1alpha1ResourceDiff struct { - - // Diff contains the JSON patch between target and live resource - // Deprecated: use NormalizedLiveState and PredictedLiveState to render the difference - Diff string `json:"diff,omitempty"` - - // group - Group string `json:"group,omitempty"` - - // hook - Hook bool `json:"hook,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` - - // TargetState contains the JSON live resource manifest - LiveState string `json:"liveState,omitempty"` - - // modified - Modified bool `json:"modified,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // namespace - Namespace string `json:"namespace,omitempty"` - - // NormalizedLiveState contains JSON serialized live resource state with applied normalizations - NormalizedLiveState string `json:"normalizedLiveState,omitempty"` - - // PredictedLiveState contains JSON serialized resource state that is calculated based on normalized and target resource state - PredictedLiveState string `json:"predictedLiveState,omitempty"` - - // resource version - ResourceVersion string `json:"resourceVersion,omitempty"` - - // TargetState contains the JSON serialized resource manifest defined in the Git/Helm - TargetState string `json:"targetState,omitempty"` -} - -// Validate validates this v1alpha1 resource diff -func (m *V1alpha1ResourceDiff) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 resource diff based on context it is used -func (m *V1alpha1ResourceDiff) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceDiff) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceDiff) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceDiff - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_ignore_differences.go b/pkg/argocd/models/v1alpha1_resource_ignore_differences.go deleted file mode 100644 index 4b4a23c..0000000 --- a/pkg/argocd/models/v1alpha1_resource_ignore_differences.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceIgnoreDifferences ResourceIgnoreDifferences contains resource filter and list of json paths which should be ignored during comparison with live state. -// -// swagger:model v1alpha1ResourceIgnoreDifferences -type V1alpha1ResourceIgnoreDifferences struct { - - // group - Group string `json:"group,omitempty"` - - // jq path expressions - JqPathExpressions []string `json:"jqPathExpressions"` - - // json pointers - JSONPointers []string `json:"jsonPointers"` - - // kind - Kind string `json:"kind,omitempty"` - - // ManagedFieldsManagers is a list of trusted managers. Fields mutated by those managers will take precedence over the - // desired state defined in the SCM and won't be displayed in diffs - ManagedFieldsManagers []string `json:"managedFieldsManagers"` - - // name - Name string `json:"name,omitempty"` - - // namespace - Namespace string `json:"namespace,omitempty"` -} - -// Validate validates this v1alpha1 resource ignore differences -func (m *V1alpha1ResourceIgnoreDifferences) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 resource ignore differences based on context it is used -func (m *V1alpha1ResourceIgnoreDifferences) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceIgnoreDifferences) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceIgnoreDifferences) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceIgnoreDifferences - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_networking_info.go b/pkg/argocd/models/v1alpha1_resource_networking_info.go deleted file mode 100644 index 6d3ec4c..0000000 --- a/pkg/argocd/models/v1alpha1_resource_networking_info.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceNetworkingInfo ResourceNetworkingInfo holds networking resource related information -// TODO: describe members of this type -// -// swagger:model v1alpha1ResourceNetworkingInfo -type V1alpha1ResourceNetworkingInfo struct { - - // ExternalURLs holds list of URLs which should be available externally. List is populated for ingress resources using rules hostnames. - ExternalURLs []string `json:"externalURLs"` - - // ingress - Ingress []*V1LoadBalancerIngress `json:"ingress"` - - // labels - Labels map[string]string `json:"labels,omitempty"` - - // target labels - TargetLabels map[string]string `json:"targetLabels,omitempty"` - - // target refs - TargetRefs []*V1alpha1ResourceRef `json:"targetRefs"` -} - -// Validate validates this v1alpha1 resource networking info -func (m *V1alpha1ResourceNetworkingInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIngress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTargetRefs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceNetworkingInfo) validateIngress(formats strfmt.Registry) error { - if swag.IsZero(m.Ingress) { // not required - return nil - } - - for i := 0; i < len(m.Ingress); i++ { - if swag.IsZero(m.Ingress[i]) { // not required - continue - } - - if m.Ingress[i] != nil { - if err := m.Ingress[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ingress" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ingress" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ResourceNetworkingInfo) validateTargetRefs(formats strfmt.Registry) error { - if swag.IsZero(m.TargetRefs) { // not required - return nil - } - - for i := 0; i < len(m.TargetRefs); i++ { - if swag.IsZero(m.TargetRefs[i]) { // not required - continue - } - - if m.TargetRefs[i] != nil { - if err := m.TargetRefs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRefs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRefs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 resource networking info based on the context it is used -func (m *V1alpha1ResourceNetworkingInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIngress(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTargetRefs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceNetworkingInfo) contextValidateIngress(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Ingress); i++ { - - if m.Ingress[i] != nil { - - if swag.IsZero(m.Ingress[i]) { // not required - return nil - } - - if err := m.Ingress[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ingress" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ingress" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ResourceNetworkingInfo) contextValidateTargetRefs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TargetRefs); i++ { - - if m.TargetRefs[i] != nil { - - if swag.IsZero(m.TargetRefs[i]) { // not required - return nil - } - - if err := m.TargetRefs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("targetRefs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("targetRefs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceNetworkingInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceNetworkingInfo) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceNetworkingInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_node.go b/pkg/argocd/models/v1alpha1_resource_node.go deleted file mode 100644 index b703e13..0000000 --- a/pkg/argocd/models/v1alpha1_resource_node.go +++ /dev/null @@ -1,443 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceNode ResourceNode contains information about live resource and its children -// TODO: describe members of this type -// -// swagger:model v1alpha1ResourceNode -type V1alpha1ResourceNode struct { - V1alpha1ResourceRef - - // created at - // Format: date-time - CreatedAt V1Time `json:"createdAt,omitempty"` - - // health - Health *V1alpha1HealthStatus `json:"health,omitempty"` - - // images - Images []string `json:"images"` - - // info - Info []*V1alpha1InfoItem `json:"info"` - - // networking info - NetworkingInfo *V1alpha1ResourceNetworkingInfo `json:"networkingInfo,omitempty"` - - // parent refs - ParentRefs []*V1alpha1ResourceRef `json:"parentRefs"` - - // resource version - ResourceVersion string `json:"resourceVersion,omitempty"` -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *V1alpha1ResourceNode) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 V1alpha1ResourceRef - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.V1alpha1ResourceRef = aO0 - - // now for regular properties - var propsV1alpha1ResourceNode struct { - CreatedAt V1Time `json:"createdAt,omitempty"` - - Health *V1alpha1HealthStatus `json:"health,omitempty"` - - Images []string `json:"images"` - - Info []*V1alpha1InfoItem `json:"info"` - - NetworkingInfo *V1alpha1ResourceNetworkingInfo `json:"networkingInfo,omitempty"` - - ParentRefs []*V1alpha1ResourceRef `json:"parentRefs"` - - ResourceVersion string `json:"resourceVersion,omitempty"` - } - if err := swag.ReadJSON(raw, &propsV1alpha1ResourceNode); err != nil { - return err - } - m.CreatedAt = propsV1alpha1ResourceNode.CreatedAt - - m.Health = propsV1alpha1ResourceNode.Health - - m.Images = propsV1alpha1ResourceNode.Images - - m.Info = propsV1alpha1ResourceNode.Info - - m.NetworkingInfo = propsV1alpha1ResourceNode.NetworkingInfo - - m.ParentRefs = propsV1alpha1ResourceNode.ParentRefs - - m.ResourceVersion = propsV1alpha1ResourceNode.ResourceVersion - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m V1alpha1ResourceNode) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 1) - - aO0, err := swag.WriteJSON(m.V1alpha1ResourceRef) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - // now for regular properties - var propsV1alpha1ResourceNode struct { - CreatedAt V1Time `json:"createdAt,omitempty"` - - Health *V1alpha1HealthStatus `json:"health,omitempty"` - - Images []string `json:"images"` - - Info []*V1alpha1InfoItem `json:"info"` - - NetworkingInfo *V1alpha1ResourceNetworkingInfo `json:"networkingInfo,omitempty"` - - ParentRefs []*V1alpha1ResourceRef `json:"parentRefs"` - - ResourceVersion string `json:"resourceVersion,omitempty"` - } - propsV1alpha1ResourceNode.CreatedAt = m.CreatedAt - - propsV1alpha1ResourceNode.Health = m.Health - - propsV1alpha1ResourceNode.Images = m.Images - - propsV1alpha1ResourceNode.Info = m.Info - - propsV1alpha1ResourceNode.NetworkingInfo = m.NetworkingInfo - - propsV1alpha1ResourceNode.ParentRefs = m.ParentRefs - - propsV1alpha1ResourceNode.ResourceVersion = m.ResourceVersion - - jsonDataPropsV1alpha1ResourceNode, errV1alpha1ResourceNode := swag.WriteJSON(propsV1alpha1ResourceNode) - if errV1alpha1ResourceNode != nil { - return nil, errV1alpha1ResourceNode - } - _parts = append(_parts, jsonDataPropsV1alpha1ResourceNode) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this v1alpha1 resource node -func (m *V1alpha1ResourceNode) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with V1alpha1ResourceRef - if err := m.V1alpha1ResourceRef.Validate(formats); err != nil { - res = append(res, err) - } - - if err := m.validateCreatedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHealth(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNetworkingInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateParentRefs(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceNode) validateCreatedAt(formats strfmt.Registry) error { - if swag.IsZero(m.CreatedAt) { // not required - return nil - } - - if err := m.CreatedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("createdAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("createdAt") - } - return err - } - - return nil -} - -func (m *V1alpha1ResourceNode) validateHealth(formats strfmt.Registry) error { - if swag.IsZero(m.Health) { // not required - return nil - } - - if m.Health != nil { - if err := m.Health.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceNode) validateInfo(formats strfmt.Registry) error { - if swag.IsZero(m.Info) { // not required - return nil - } - - for i := 0; i < len(m.Info); i++ { - if swag.IsZero(m.Info[i]) { // not required - continue - } - - if m.Info[i] != nil { - if err := m.Info[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ResourceNode) validateNetworkingInfo(formats strfmt.Registry) error { - if swag.IsZero(m.NetworkingInfo) { // not required - return nil - } - - if m.NetworkingInfo != nil { - if err := m.NetworkingInfo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkingInfo") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceNode) validateParentRefs(formats strfmt.Registry) error { - if swag.IsZero(m.ParentRefs) { // not required - return nil - } - - for i := 0; i < len(m.ParentRefs); i++ { - if swag.IsZero(m.ParentRefs[i]) { // not required - continue - } - - if m.ParentRefs[i] != nil { - if err := m.ParentRefs[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentRefs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentRefs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 resource node based on the context it is used -func (m *V1alpha1ResourceNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - // validation for a type composition with V1alpha1ResourceRef - if err := m.V1alpha1ResourceRef.ContextValidate(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateCreatedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHealth(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateNetworkingInfo(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateParentRefs(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceNode) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.CreatedAt) { // not required - return nil - } - - if err := m.CreatedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("createdAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("createdAt") - } - return err - } - - return nil -} - -func (m *V1alpha1ResourceNode) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { - - if m.Health != nil { - - if swag.IsZero(m.Health) { // not required - return nil - } - - if err := m.Health.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceNode) contextValidateInfo(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Info); i++ { - - if m.Info[i] != nil { - - if swag.IsZero(m.Info[i]) { // not required - return nil - } - - if err := m.Info[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("info" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("info" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1ResourceNode) contextValidateNetworkingInfo(ctx context.Context, formats strfmt.Registry) error { - - if m.NetworkingInfo != nil { - - if swag.IsZero(m.NetworkingInfo) { // not required - return nil - } - - if err := m.NetworkingInfo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("networkingInfo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("networkingInfo") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceNode) contextValidateParentRefs(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.ParentRefs); i++ { - - if m.ParentRefs[i] != nil { - - if swag.IsZero(m.ParentRefs[i]) { // not required - return nil - } - - if err := m.ParentRefs[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("parentRefs" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("parentRefs" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceNode) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceNode) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_override.go b/pkg/argocd/models/v1alpha1_resource_override.go deleted file mode 100644 index f29ef06..0000000 --- a/pkg/argocd/models/v1alpha1_resource_override.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceOverride ResourceOverride holds configuration to customize resource diffing and health assessment -// TODO: describe the members of this type -// -// swagger:model v1alpha1ResourceOverride -type V1alpha1ResourceOverride struct { - - // actions - Actions string `json:"actions,omitempty"` - - // health lua - HealthLua string `json:"healthLua,omitempty"` - - // ignore differences - IgnoreDifferences *V1alpha1OverrideIgnoreDiff `json:"ignoreDifferences,omitempty"` - - // ignore resource updates - IgnoreResourceUpdates *V1alpha1OverrideIgnoreDiff `json:"ignoreResourceUpdates,omitempty"` - - // known type fields - KnownTypeFields []*V1alpha1KnownTypeField `json:"knownTypeFields"` - - // use open libs - UseOpenLibs bool `json:"useOpenLibs,omitempty"` -} - -// Validate validates this v1alpha1 resource override -func (m *V1alpha1ResourceOverride) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIgnoreDifferences(formats); err != nil { - res = append(res, err) - } - - if err := m.validateIgnoreResourceUpdates(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKnownTypeFields(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceOverride) validateIgnoreDifferences(formats strfmt.Registry) error { - if swag.IsZero(m.IgnoreDifferences) { // not required - return nil - } - - if m.IgnoreDifferences != nil { - if err := m.IgnoreDifferences.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreDifferences") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreDifferences") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceOverride) validateIgnoreResourceUpdates(formats strfmt.Registry) error { - if swag.IsZero(m.IgnoreResourceUpdates) { // not required - return nil - } - - if m.IgnoreResourceUpdates != nil { - if err := m.IgnoreResourceUpdates.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreResourceUpdates") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreResourceUpdates") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceOverride) validateKnownTypeFields(formats strfmt.Registry) error { - if swag.IsZero(m.KnownTypeFields) { // not required - return nil - } - - for i := 0; i < len(m.KnownTypeFields); i++ { - if swag.IsZero(m.KnownTypeFields[i]) { // not required - continue - } - - if m.KnownTypeFields[i] != nil { - if err := m.KnownTypeFields[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("knownTypeFields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("knownTypeFields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 resource override based on the context it is used -func (m *V1alpha1ResourceOverride) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateIgnoreDifferences(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateIgnoreResourceUpdates(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateKnownTypeFields(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceOverride) contextValidateIgnoreDifferences(ctx context.Context, formats strfmt.Registry) error { - - if m.IgnoreDifferences != nil { - - if swag.IsZero(m.IgnoreDifferences) { // not required - return nil - } - - if err := m.IgnoreDifferences.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreDifferences") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreDifferences") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceOverride) contextValidateIgnoreResourceUpdates(ctx context.Context, formats strfmt.Registry) error { - - if m.IgnoreResourceUpdates != nil { - - if swag.IsZero(m.IgnoreResourceUpdates) { // not required - return nil - } - - if err := m.IgnoreResourceUpdates.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ignoreResourceUpdates") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ignoreResourceUpdates") - } - return err - } - } - - return nil -} - -func (m *V1alpha1ResourceOverride) contextValidateKnownTypeFields(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.KnownTypeFields); i++ { - - if m.KnownTypeFields[i] != nil { - - if swag.IsZero(m.KnownTypeFields[i]) { // not required - return nil - } - - if err := m.KnownTypeFields[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("knownTypeFields" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("knownTypeFields" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceOverride) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceOverride) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceOverride - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_ref.go b/pkg/argocd/models/v1alpha1_resource_ref.go deleted file mode 100644 index 0840676..0000000 --- a/pkg/argocd/models/v1alpha1_resource_ref.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceRef ResourceRef includes fields which uniquely identify a resource -// -// swagger:model v1alpha1ResourceRef -type V1alpha1ResourceRef struct { - - // group - Group string `json:"group,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // namespace - Namespace string `json:"namespace,omitempty"` - - // uid - UID string `json:"uid,omitempty"` - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this v1alpha1 resource ref -func (m *V1alpha1ResourceRef) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 resource ref based on context it is used -func (m *V1alpha1ResourceRef) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceRef) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceRef) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceRef - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_result.go b/pkg/argocd/models/v1alpha1_resource_result.go deleted file mode 100644 index f60bed3..0000000 --- a/pkg/argocd/models/v1alpha1_resource_result.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceResult ResourceResult holds the operation result details of a specific resource -// -// swagger:model v1alpha1ResourceResult -type V1alpha1ResourceResult struct { - - // Group specifies the API group of the resource - Group string `json:"group,omitempty"` - - // HookPhase contains the state of any operation associated with this resource OR hook - // This can also contain values for non-hook resources. - HookPhase string `json:"hookPhase,omitempty"` - - // HookType specifies the type of the hook. Empty for non-hook resources - HookType string `json:"hookType,omitempty"` - - // Kind specifies the API kind of the resource - Kind string `json:"kind,omitempty"` - - // Message contains an informational or error message for the last sync OR operation - Message string `json:"message,omitempty"` - - // Name specifies the name of the resource - Name string `json:"name,omitempty"` - - // Namespace specifies the target namespace of the resource - Namespace string `json:"namespace,omitempty"` - - // Status holds the final result of the sync. Will be empty if the resources is yet to be applied/pruned and is always zero-value for hooks - Status string `json:"status,omitempty"` - - // SyncPhase indicates the particular phase of the sync that this result was acquired in - SyncPhase string `json:"syncPhase,omitempty"` - - // Version specifies the API version of the resource - Version string `json:"version,omitempty"` -} - -// Validate validates this v1alpha1 resource result -func (m *V1alpha1ResourceResult) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 resource result based on context it is used -func (m *V1alpha1ResourceResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceResult) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_resource_status.go b/pkg/argocd/models/v1alpha1_resource_status.go deleted file mode 100644 index 50d62aa..0000000 --- a/pkg/argocd/models/v1alpha1_resource_status.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1ResourceStatus ResourceStatus holds the current sync and health status of a resource -// TODO: describe members of this type -// -// swagger:model v1alpha1ResourceStatus -type V1alpha1ResourceStatus struct { - - // group - Group string `json:"group,omitempty"` - - // health - Health *V1alpha1HealthStatus `json:"health,omitempty"` - - // hook - Hook bool `json:"hook,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // namespace - Namespace string `json:"namespace,omitempty"` - - // requires pruning - RequiresPruning bool `json:"requiresPruning,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // sync wave - SyncWave int64 `json:"syncWave,omitempty"` - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this v1alpha1 resource status -func (m *V1alpha1ResourceStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateHealth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceStatus) validateHealth(formats strfmt.Registry) error { - if swag.IsZero(m.Health) { // not required - return nil - } - - if m.Health != nil { - if err := m.Health.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 resource status based on the context it is used -func (m *V1alpha1ResourceStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateHealth(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1ResourceStatus) contextValidateHealth(ctx context.Context, formats strfmt.Registry) error { - - if m.Health != nil { - - if swag.IsZero(m.Health) { // not required - return nil - } - - if err := m.Health.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("health") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("health") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1ResourceStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1ResourceStatus) UnmarshalBinary(b []byte) error { - var res V1alpha1ResourceStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_retry_strategy.go b/pkg/argocd/models/v1alpha1_retry_strategy.go deleted file mode 100644 index d3eee7e..0000000 --- a/pkg/argocd/models/v1alpha1_retry_strategy.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RetryStrategy RetryStrategy contains information about the strategy to apply when a sync failed -// -// swagger:model v1alpha1RetryStrategy -type V1alpha1RetryStrategy struct { - - // backoff - Backoff *V1alpha1Backoff `json:"backoff,omitempty"` - - // Limit is the maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed. - Limit int64 `json:"limit,omitempty"` -} - -// Validate validates this v1alpha1 retry strategy -func (m *V1alpha1RetryStrategy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBackoff(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RetryStrategy) validateBackoff(formats strfmt.Registry) error { - if swag.IsZero(m.Backoff) { // not required - return nil - } - - if m.Backoff != nil { - if err := m.Backoff.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backoff") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backoff") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 retry strategy based on the context it is used -func (m *V1alpha1RetryStrategy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBackoff(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RetryStrategy) contextValidateBackoff(ctx context.Context, formats strfmt.Registry) error { - - if m.Backoff != nil { - - if swag.IsZero(m.Backoff) { // not required - return nil - } - - if err := m.Backoff.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("backoff") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("backoff") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RetryStrategy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RetryStrategy) UnmarshalBinary(b []byte) error { - var res V1alpha1RetryStrategy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_revision_history.go b/pkg/argocd/models/v1alpha1_revision_history.go deleted file mode 100644 index b76c21c..0000000 --- a/pkg/argocd/models/v1alpha1_revision_history.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RevisionHistory RevisionHistory contains history information about a previous sync -// -// swagger:model v1alpha1RevisionHistory -type V1alpha1RevisionHistory struct { - - // deploy started at - // Format: date-time - DeployStartedAt V1Time `json:"deployStartedAt,omitempty"` - - // deployed at - // Format: date-time - DeployedAt V1Time `json:"deployedAt,omitempty"` - - // ID is an auto incrementing identifier of the RevisionHistory - ID int64 `json:"id,omitempty"` - - // initiated by - InitiatedBy *V1alpha1OperationInitiator `json:"initiatedBy,omitempty"` - - // Revision holds the revision the sync was performed against - Revision string `json:"revision,omitempty"` - - // Revisions holds the revision of each source in sources field the sync was performed against - Revisions []string `json:"revisions"` - - // source - Source *V1alpha1ApplicationSource `json:"source,omitempty"` - - // Sources is a reference to the application sources used for the sync operation - Sources []*V1alpha1ApplicationSource `json:"sources"` -} - -// Validate validates this v1alpha1 revision history -func (m *V1alpha1RevisionHistory) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDeployStartedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateDeployedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateInitiatedBy(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RevisionHistory) validateDeployStartedAt(formats strfmt.Registry) error { - if swag.IsZero(m.DeployStartedAt) { // not required - return nil - } - - if err := m.DeployStartedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployStartedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployStartedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1RevisionHistory) validateDeployedAt(formats strfmt.Registry) error { - if swag.IsZero(m.DeployedAt) { // not required - return nil - } - - if err := m.DeployedAt.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1RevisionHistory) validateInitiatedBy(formats strfmt.Registry) error { - if swag.IsZero(m.InitiatedBy) { // not required - return nil - } - - if m.InitiatedBy != nil { - if err := m.InitiatedBy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("initiatedBy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("initiatedBy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1RevisionHistory) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1RevisionHistory) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 revision history based on the context it is used -func (m *V1alpha1RevisionHistory) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDeployStartedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateDeployedAt(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateInitiatedBy(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RevisionHistory) contextValidateDeployStartedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.DeployStartedAt) { // not required - return nil - } - - if err := m.DeployStartedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployStartedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployStartedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1RevisionHistory) contextValidateDeployedAt(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.DeployedAt) { // not required - return nil - } - - if err := m.DeployedAt.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("deployedAt") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("deployedAt") - } - return err - } - - return nil -} - -func (m *V1alpha1RevisionHistory) contextValidateInitiatedBy(ctx context.Context, formats strfmt.Registry) error { - - if m.InitiatedBy != nil { - - if swag.IsZero(m.InitiatedBy) { // not required - return nil - } - - if err := m.InitiatedBy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("initiatedBy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("initiatedBy") - } - return err - } - } - - return nil -} - -func (m *V1alpha1RevisionHistory) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1RevisionHistory) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RevisionHistory) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RevisionHistory) UnmarshalBinary(b []byte) error { - var res V1alpha1RevisionHistory - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_revision_metadata.go b/pkg/argocd/models/v1alpha1_revision_metadata.go deleted file mode 100644 index 8c9bbd4..0000000 --- a/pkg/argocd/models/v1alpha1_revision_metadata.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1RevisionMetadata RevisionMetadata contains metadata for a specific revision in a Git repository -// -// swagger:model v1alpha1RevisionMetadata -type V1alpha1RevisionMetadata struct { - - // who authored this revision, - // typically their name and email, e.g. "John Doe ", - // but might not match this example - Author string `json:"author,omitempty"` - - // date - // Format: date-time - Date V1Time `json:"date,omitempty"` - - // Message contains the message associated with the revision, most likely the commit message. - Message string `json:"message,omitempty"` - - // SignatureInfo contains a hint on the signer if the revision was signed with GPG, and signature verification is enabled. - SignatureInfo string `json:"signatureInfo,omitempty"` - - // Tags specifies any tags currently attached to the revision - // Floating tags can move from one revision to another - Tags []string `json:"tags"` -} - -// Validate validates this v1alpha1 revision metadata -func (m *V1alpha1RevisionMetadata) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RevisionMetadata) validateDate(formats strfmt.Registry) error { - if swag.IsZero(m.Date) { // not required - return nil - } - - if err := m.Date.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("date") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("date") - } - return err - } - - return nil -} - -// ContextValidate validate this v1alpha1 revision metadata based on the context it is used -func (m *V1alpha1RevisionMetadata) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateDate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1RevisionMetadata) contextValidateDate(ctx context.Context, formats strfmt.Registry) error { - - if swag.IsZero(m.Date) { // not required - return nil - } - - if err := m.Date.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("date") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("date") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1RevisionMetadata) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1RevisionMetadata) UnmarshalBinary(b []byte) error { - var res V1alpha1RevisionMetadata - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator.go deleted file mode 100644 index ffc14a8..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator.go +++ /dev/null @@ -1,539 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGenerator SCMProviderGenerator defines a generator that scrapes a SCMaaS API to find candidate repos. -// -// swagger:model v1alpha1SCMProviderGenerator -type V1alpha1SCMProviderGenerator struct { - - // aws code commit - AwsCodeCommit *V1alpha1SCMProviderGeneratorAWSCodeCommit `json:"awsCodeCommit,omitempty"` - - // azure dev ops - AzureDevOps *V1alpha1SCMProviderGeneratorAzureDevOps `json:"azureDevOps,omitempty"` - - // bitbucket - Bitbucket *V1alpha1SCMProviderGeneratorBitbucket `json:"bitbucket,omitempty"` - - // bitbucket server - BitbucketServer *V1alpha1SCMProviderGeneratorBitbucketServer `json:"bitbucketServer,omitempty"` - - // Which protocol to use for the SCM URL. Default is provider-specific but ssh if possible. Not all providers - // necessarily support all protocols. - CloneProtocol string `json:"cloneProtocol,omitempty"` - - // Filters for which repos should be considered. - Filters []*V1alpha1SCMProviderGeneratorFilter `json:"filters"` - - // gitea - Gitea *V1alpha1SCMProviderGeneratorGitea `json:"gitea,omitempty"` - - // github - Github *V1alpha1SCMProviderGeneratorGithub `json:"github,omitempty"` - - // gitlab - Gitlab *V1alpha1SCMProviderGeneratorGitlab `json:"gitlab,omitempty"` - - // Standard parameters. - RequeueAfterSeconds int64 `json:"requeueAfterSeconds,omitempty"` - - // template - Template *V1alpha1ApplicationSetTemplate `json:"template,omitempty"` - - // Values contains key/value pairs which are passed directly as parameters to the template - Values map[string]string `json:"values,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator -func (m *V1alpha1SCMProviderGenerator) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAwsCodeCommit(formats); err != nil { - res = append(res, err) - } - - if err := m.validateAzureDevOps(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBitbucket(formats); err != nil { - res = append(res, err) - } - - if err := m.validateBitbucketServer(formats); err != nil { - res = append(res, err) - } - - if err := m.validateFilters(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGitea(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGithub(formats); err != nil { - res = append(res, err) - } - - if err := m.validateGitlab(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTemplate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateAwsCodeCommit(formats strfmt.Registry) error { - if swag.IsZero(m.AwsCodeCommit) { // not required - return nil - } - - if m.AwsCodeCommit != nil { - if err := m.AwsCodeCommit.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCodeCommit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCodeCommit") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateAzureDevOps(formats strfmt.Registry) error { - if swag.IsZero(m.AzureDevOps) { // not required - return nil - } - - if m.AzureDevOps != nil { - if err := m.AzureDevOps.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureDevOps") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureDevOps") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateBitbucket(formats strfmt.Registry) error { - if swag.IsZero(m.Bitbucket) { // not required - return nil - } - - if m.Bitbucket != nil { - if err := m.Bitbucket.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucket") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateBitbucketServer(formats strfmt.Registry) error { - if swag.IsZero(m.BitbucketServer) { // not required - return nil - } - - if m.BitbucketServer != nil { - if err := m.BitbucketServer.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucketServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucketServer") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateFilters(formats strfmt.Registry) error { - if swag.IsZero(m.Filters) { // not required - return nil - } - - for i := 0; i < len(m.Filters); i++ { - if swag.IsZero(m.Filters[i]) { // not required - continue - } - - if m.Filters[i] != nil { - if err := m.Filters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateGitea(formats strfmt.Registry) error { - if swag.IsZero(m.Gitea) { // not required - return nil - } - - if m.Gitea != nil { - if err := m.Gitea.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitea") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitea") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateGithub(formats strfmt.Registry) error { - if swag.IsZero(m.Github) { // not required - return nil - } - - if m.Github != nil { - if err := m.Github.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("github") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("github") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateGitlab(formats strfmt.Registry) error { - if swag.IsZero(m.Gitlab) { // not required - return nil - } - - if m.Gitlab != nil { - if err := m.Gitlab.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitlab") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitlab") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) validateTemplate(formats strfmt.Registry) error { - if swag.IsZero(m.Template) { // not required - return nil - } - - if m.Template != nil { - if err := m.Template.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator based on the context it is used -func (m *V1alpha1SCMProviderGenerator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAwsCodeCommit(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateAzureDevOps(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBitbucket(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateBitbucketServer(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGitea(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGithub(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateGitlab(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateTemplate(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateAwsCodeCommit(ctx context.Context, formats strfmt.Registry) error { - - if m.AwsCodeCommit != nil { - - if swag.IsZero(m.AwsCodeCommit) { // not required - return nil - } - - if err := m.AwsCodeCommit.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("awsCodeCommit") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("awsCodeCommit") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateAzureDevOps(ctx context.Context, formats strfmt.Registry) error { - - if m.AzureDevOps != nil { - - if swag.IsZero(m.AzureDevOps) { // not required - return nil - } - - if err := m.AzureDevOps.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("azureDevOps") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("azureDevOps") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateBitbucket(ctx context.Context, formats strfmt.Registry) error { - - if m.Bitbucket != nil { - - if swag.IsZero(m.Bitbucket) { // not required - return nil - } - - if err := m.Bitbucket.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucket") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucket") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateBitbucketServer(ctx context.Context, formats strfmt.Registry) error { - - if m.BitbucketServer != nil { - - if swag.IsZero(m.BitbucketServer) { // not required - return nil - } - - if err := m.BitbucketServer.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("bitbucketServer") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("bitbucketServer") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Filters); i++ { - - if m.Filters[i] != nil { - - if swag.IsZero(m.Filters[i]) { // not required - return nil - } - - if err := m.Filters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("filters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("filters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateGitea(ctx context.Context, formats strfmt.Registry) error { - - if m.Gitea != nil { - - if swag.IsZero(m.Gitea) { // not required - return nil - } - - if err := m.Gitea.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitea") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitea") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateGithub(ctx context.Context, formats strfmt.Registry) error { - - if m.Github != nil { - - if swag.IsZero(m.Github) { // not required - return nil - } - - if err := m.Github.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("github") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("github") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateGitlab(ctx context.Context, formats strfmt.Registry) error { - - if m.Gitlab != nil { - - if swag.IsZero(m.Gitlab) { // not required - return nil - } - - if err := m.Gitlab.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("gitlab") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("gitlab") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SCMProviderGenerator) contextValidateTemplate(ctx context.Context, formats strfmt.Registry) error { - - if m.Template != nil { - - if swag.IsZero(m.Template) { // not required - return nil - } - - if err := m.Template.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("template") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("template") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGenerator) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGenerator) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGenerator - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_a_w_s_code_commit.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_a_w_s_code_commit.go deleted file mode 100644 index 3304533..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_a_w_s_code_commit.go +++ /dev/null @@ -1,132 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorAWSCodeCommit SCMProviderGeneratorAWSCodeCommit defines connection info specific to AWS CodeCommit. -// -// swagger:model v1alpha1SCMProviderGeneratorAWSCodeCommit -type V1alpha1SCMProviderGeneratorAWSCodeCommit struct { - - // Scan all branches instead of just the default branch. - AllBranches bool `json:"allBranches,omitempty"` - - // Region provides the AWS region to discover repos. - // if not provided, AppSet controller will infer the current region from environment. - Region string `json:"region,omitempty"` - - // Role provides the AWS IAM role to assume, for cross-account repo discovery - // if not provided, AppSet controller will use its pod/node identity to discover. - Role string `json:"role,omitempty"` - - // TagFilters provides the tag filter(s) for repo discovery - TagFilters []*V1alpha1TagFilter `json:"tagFilters"` -} - -// Validate validates this v1alpha1 s c m provider generator a w s code commit -func (m *V1alpha1SCMProviderGeneratorAWSCodeCommit) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTagFilters(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorAWSCodeCommit) validateTagFilters(formats strfmt.Registry) error { - if swag.IsZero(m.TagFilters) { // not required - return nil - } - - for i := 0; i < len(m.TagFilters); i++ { - if swag.IsZero(m.TagFilters[i]) { // not required - continue - } - - if m.TagFilters[i] != nil { - if err := m.TagFilters[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator a w s code commit based on the context it is used -func (m *V1alpha1SCMProviderGeneratorAWSCodeCommit) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTagFilters(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorAWSCodeCommit) contextValidateTagFilters(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.TagFilters); i++ { - - if m.TagFilters[i] != nil { - - if swag.IsZero(m.TagFilters[i]) { // not required - return nil - } - - if err := m.TagFilters[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tagFilters" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tagFilters" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorAWSCodeCommit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorAWSCodeCommit) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorAWSCodeCommit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_azure_dev_ops.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_azure_dev_ops.go deleted file mode 100644 index d51edbc..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_azure_dev_ops.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorAzureDevOps SCMProviderGeneratorAzureDevOps defines connection info specific to Azure DevOps. -// -// swagger:model v1alpha1SCMProviderGeneratorAzureDevOps -type V1alpha1SCMProviderGeneratorAzureDevOps struct { - - // access token ref - AccessTokenRef *V1alpha1SecretRef `json:"accessTokenRef,omitempty"` - - // Scan all branches instead of just the default branch. - AllBranches bool `json:"allBranches,omitempty"` - - // The URL to Azure DevOps. If blank, use https://dev.azure.com. - API string `json:"api,omitempty"` - - // Azure Devops organization. Required. E.g. "my-organization". - Organization string `json:"organization,omitempty"` - - // Azure Devops team project. Required. E.g. "my-team". - TeamProject string `json:"teamProject,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator azure dev ops -func (m *V1alpha1SCMProviderGeneratorAzureDevOps) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAccessTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorAzureDevOps) validateAccessTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.AccessTokenRef) { // not required - return nil - } - - if m.AccessTokenRef != nil { - if err := m.AccessTokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessTokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessTokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator azure dev ops based on the context it is used -func (m *V1alpha1SCMProviderGeneratorAzureDevOps) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAccessTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorAzureDevOps) contextValidateAccessTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.AccessTokenRef != nil { - - if swag.IsZero(m.AccessTokenRef) { // not required - return nil - } - - if err := m.AccessTokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("accessTokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("accessTokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorAzureDevOps) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorAzureDevOps) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorAzureDevOps - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_bitbucket.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_bitbucket.go deleted file mode 100644 index 385c2cc..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_bitbucket.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorBitbucket SCMProviderGeneratorBitbucket defines connection info specific to Bitbucket Cloud (API version 2). -// -// swagger:model v1alpha1SCMProviderGeneratorBitbucket -type V1alpha1SCMProviderGeneratorBitbucket struct { - - // Scan all branches instead of just the main branch. - AllBranches bool `json:"allBranches,omitempty"` - - // app password ref - AppPasswordRef *V1alpha1SecretRef `json:"appPasswordRef,omitempty"` - - // Bitbucket workspace to scan. Required. - Owner string `json:"owner,omitempty"` - - // Bitbucket user to use when authenticating. Should have a "member" role to be able to read all repositories and branches. Required - User string `json:"user,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator bitbucket -func (m *V1alpha1SCMProviderGeneratorBitbucket) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAppPasswordRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorBitbucket) validateAppPasswordRef(formats strfmt.Registry) error { - if swag.IsZero(m.AppPasswordRef) { // not required - return nil - } - - if m.AppPasswordRef != nil { - if err := m.AppPasswordRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appPasswordRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appPasswordRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator bitbucket based on the context it is used -func (m *V1alpha1SCMProviderGeneratorBitbucket) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAppPasswordRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorBitbucket) contextValidateAppPasswordRef(ctx context.Context, formats strfmt.Registry) error { - - if m.AppPasswordRef != nil { - - if swag.IsZero(m.AppPasswordRef) { // not required - return nil - } - - if err := m.AppPasswordRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("appPasswordRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("appPasswordRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorBitbucket) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorBitbucket) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorBitbucket - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_bitbucket_server.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_bitbucket_server.go deleted file mode 100644 index 8f89633..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_bitbucket_server.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorBitbucketServer SCMProviderGeneratorBitbucketServer defines connection info specific to Bitbucket Server. -// -// swagger:model v1alpha1SCMProviderGeneratorBitbucketServer -type V1alpha1SCMProviderGeneratorBitbucketServer struct { - - // Scan all branches instead of just the default branch. - AllBranches bool `json:"allBranches,omitempty"` - - // The Bitbucket Server REST API URL to talk to. Required. - API string `json:"api,omitempty"` - - // basic auth - BasicAuth *V1alpha1BasicAuthBitbucketServer `json:"basicAuth,omitempty"` - - // Project to scan. Required. - Project string `json:"project,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator bitbucket server -func (m *V1alpha1SCMProviderGeneratorBitbucketServer) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateBasicAuth(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorBitbucketServer) validateBasicAuth(formats strfmt.Registry) error { - if swag.IsZero(m.BasicAuth) { // not required - return nil - } - - if m.BasicAuth != nil { - if err := m.BasicAuth.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("basicAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("basicAuth") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator bitbucket server based on the context it is used -func (m *V1alpha1SCMProviderGeneratorBitbucketServer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateBasicAuth(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorBitbucketServer) contextValidateBasicAuth(ctx context.Context, formats strfmt.Registry) error { - - if m.BasicAuth != nil { - - if swag.IsZero(m.BasicAuth) { // not required - return nil - } - - if err := m.BasicAuth.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("basicAuth") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("basicAuth") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorBitbucketServer) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorBitbucketServer) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorBitbucketServer - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_filter.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_filter.go deleted file mode 100644 index 60ff3d8..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_filter.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorFilter SCMProviderGeneratorFilter is a single repository filter. -// If multiple filter types are set on a single struct, they will be AND'd together. All filters must -// pass for a repo to be included. -// -// swagger:model v1alpha1SCMProviderGeneratorFilter -type V1alpha1SCMProviderGeneratorFilter struct { - - // A regex which must match the branch name. - BranchMatch string `json:"branchMatch,omitempty"` - - // A regex which must match at least one label. - LabelMatch string `json:"labelMatch,omitempty"` - - // An array of paths, all of which must not exist. - PathsDoNotExist []string `json:"pathsDoNotExist"` - - // An array of paths, all of which must exist. - PathsExist []string `json:"pathsExist"` - - // A regex for repo names. - RepositoryMatch string `json:"repositoryMatch,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator filter -func (m *V1alpha1SCMProviderGeneratorFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 s c m provider generator filter based on context it is used -func (m *V1alpha1SCMProviderGeneratorFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorFilter) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_gitea.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_gitea.go deleted file mode 100644 index cf523a1..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_gitea.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorGitea SCMProviderGeneratorGitea defines a connection info specific to Gitea. -// -// swagger:model v1alpha1SCMProviderGeneratorGitea -type V1alpha1SCMProviderGeneratorGitea struct { - - // Scan all branches instead of just the default branch. - AllBranches bool `json:"allBranches,omitempty"` - - // The Gitea URL to talk to. For example https://gitea.mydomain.com/. - API string `json:"api,omitempty"` - - // Allow self-signed TLS / Certificates; default: false - Insecure bool `json:"insecure,omitempty"` - - // Gitea organization or user to scan. Required. - Owner string `json:"owner,omitempty"` - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator gitea -func (m *V1alpha1SCMProviderGeneratorGitea) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorGitea) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator gitea based on the context it is used -func (m *V1alpha1SCMProviderGeneratorGitea) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorGitea) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorGitea) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorGitea) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorGitea - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_github.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_github.go deleted file mode 100644 index ba89bcd..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_github.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorGithub SCMProviderGeneratorGithub defines connection info specific to GitHub. -// -// swagger:model v1alpha1SCMProviderGeneratorGithub -type V1alpha1SCMProviderGeneratorGithub struct { - - // Scan all branches instead of just the default branch. - AllBranches bool `json:"allBranches,omitempty"` - - // The GitHub API URL to talk to. If blank, use https://api.github.com/. - API string `json:"api,omitempty"` - - // AppSecretName is a reference to a GitHub App repo-creds secret. - AppSecretName string `json:"appSecretName,omitempty"` - - // GitHub org to scan. Required. - Organization string `json:"organization,omitempty"` - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator github -func (m *V1alpha1SCMProviderGeneratorGithub) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorGithub) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator github based on the context it is used -func (m *V1alpha1SCMProviderGeneratorGithub) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorGithub) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorGithub) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorGithub) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorGithub - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_gitlab.go b/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_gitlab.go deleted file mode 100644 index 0c83d47..0000000 --- a/pkg/argocd/models/v1alpha1_s_c_m_provider_generator_gitlab.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SCMProviderGeneratorGitlab SCMProviderGeneratorGitlab defines connection info specific to Gitlab. -// -// swagger:model v1alpha1SCMProviderGeneratorGitlab -type V1alpha1SCMProviderGeneratorGitlab struct { - - // Scan all branches instead of just the default branch. - AllBranches bool `json:"allBranches,omitempty"` - - // The Gitlab API URL to talk to. - API string `json:"api,omitempty"` - - // Gitlab group to scan. Required. You can use either the project id (recommended) or the full namespaced path. - Group string `json:"group,omitempty"` - - // When recursing through subgroups, also include shared Projects (true) or scan only the subgroups under same path (false). Defaults to "true" - IncludeSharedProjects bool `json:"includeSharedProjects,omitempty"` - - // Recurse through subgroups (true) or scan only the base group (false). Defaults to "false" - IncludeSubgroups bool `json:"includeSubgroups,omitempty"` - - // Skips validating the SCM provider's TLS certificate - useful for self-signed certificates.; default: false - Insecure bool `json:"insecure,omitempty"` - - // token ref - TokenRef *V1alpha1SecretRef `json:"tokenRef,omitempty"` - - // Filter repos list based on Gitlab Topic. - Topic string `json:"topic,omitempty"` -} - -// Validate validates this v1alpha1 s c m provider generator gitlab -func (m *V1alpha1SCMProviderGeneratorGitlab) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTokenRef(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorGitlab) validateTokenRef(formats strfmt.Registry) error { - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if m.TokenRef != nil { - if err := m.TokenRef.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 s c m provider generator gitlab based on the context it is used -func (m *V1alpha1SCMProviderGeneratorGitlab) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateTokenRef(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SCMProviderGeneratorGitlab) contextValidateTokenRef(ctx context.Context, formats strfmt.Registry) error { - - if m.TokenRef != nil { - - if swag.IsZero(m.TokenRef) { // not required - return nil - } - - if err := m.TokenRef.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tokenRef") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("tokenRef") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorGitlab) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SCMProviderGeneratorGitlab) UnmarshalBinary(b []byte) error { - var res V1alpha1SCMProviderGeneratorGitlab - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_secret_ref.go b/pkg/argocd/models/v1alpha1_secret_ref.go deleted file mode 100644 index 040e4f1..0000000 --- a/pkg/argocd/models/v1alpha1_secret_ref.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SecretRef Utility struct for a reference to a secret key. -// -// swagger:model v1alpha1SecretRef -type V1alpha1SecretRef struct { - - // key - Key string `json:"key,omitempty"` - - // secret name - SecretName string `json:"secretName,omitempty"` -} - -// Validate validates this v1alpha1 secret ref -func (m *V1alpha1SecretRef) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 secret ref based on context it is used -func (m *V1alpha1SecretRef) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SecretRef) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SecretRef) UnmarshalBinary(b []byte) error { - var res V1alpha1SecretRef - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_signature_key.go b/pkg/argocd/models/v1alpha1_signature_key.go deleted file mode 100644 index c41bc84..0000000 --- a/pkg/argocd/models/v1alpha1_signature_key.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SignatureKey SignatureKey is the specification of a key required to verify commit signatures with -// -// swagger:model v1alpha1SignatureKey -type V1alpha1SignatureKey struct { - - // The ID of the key in hexadecimal notation - KeyID string `json:"keyID,omitempty"` -} - -// Validate validates this v1alpha1 signature key -func (m *V1alpha1SignatureKey) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 signature key based on context it is used -func (m *V1alpha1SignatureKey) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SignatureKey) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SignatureKey) UnmarshalBinary(b []byte) error { - var res V1alpha1SignatureKey - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_operation.go b/pkg/argocd/models/v1alpha1_sync_operation.go deleted file mode 100644 index d8b01f7..0000000 --- a/pkg/argocd/models/v1alpha1_sync_operation.go +++ /dev/null @@ -1,306 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncOperation SyncOperation contains details about a sync operation. -// -// swagger:model v1alpha1SyncOperation -type V1alpha1SyncOperation struct { - - // DryRun specifies to perform a `kubectl apply --dry-run` without actually performing the sync - DryRun bool `json:"dryRun,omitempty"` - - // Manifests is an optional field that overrides sync source with a local directory for development - Manifests []string `json:"manifests"` - - // Prune specifies to delete resources from the cluster that are no longer tracked in git - Prune bool `json:"prune,omitempty"` - - // Resources describes which resources shall be part of the sync - Resources []*V1alpha1SyncOperationResource `json:"resources"` - - // Revision is the revision (Git) or chart version (Helm) which to sync the application to - // If omitted, will use the revision specified in app spec. - Revision string `json:"revision,omitempty"` - - // Revisions is the list of revision (Git) or chart version (Helm) which to sync each source in sources field for the application to - // If omitted, will use the revision specified in app spec. - Revisions []string `json:"revisions"` - - // source - Source *V1alpha1ApplicationSource `json:"source,omitempty"` - - // Sources overrides the source definition set in the application. - // This is typically set in a Rollback operation and is nil during a Sync operation - Sources []*V1alpha1ApplicationSource `json:"sources"` - - // SyncOptions provide per-sync sync-options, e.g. Validate=false - SyncOptions []string `json:"syncOptions"` - - // sync strategy - SyncStrategy *V1alpha1SyncStrategy `json:"syncStrategy,omitempty"` -} - -// Validate validates this v1alpha1 sync operation -func (m *V1alpha1SyncOperation) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateResources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSyncStrategy(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncOperation) validateResources(formats strfmt.Registry) error { - if swag.IsZero(m.Resources) { // not required - return nil - } - - for i := 0; i < len(m.Resources); i++ { - if swag.IsZero(m.Resources[i]) { // not required - continue - } - - if m.Resources[i] != nil { - if err := m.Resources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SyncOperation) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncOperation) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SyncOperation) validateSyncStrategy(formats strfmt.Registry) error { - if swag.IsZero(m.SyncStrategy) { // not required - return nil - } - - if m.SyncStrategy != nil { - if err := m.SyncStrategy.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncStrategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncStrategy") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 sync operation based on the context it is used -func (m *V1alpha1SyncOperation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateResources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSyncStrategy(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncOperation) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Resources); i++ { - - if m.Resources[i] != nil { - - if swag.IsZero(m.Resources[i]) { // not required - return nil - } - - if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SyncOperation) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncOperation) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SyncOperation) contextValidateSyncStrategy(ctx context.Context, formats strfmt.Registry) error { - - if m.SyncStrategy != nil { - - if swag.IsZero(m.SyncStrategy) { // not required - return nil - } - - if err := m.SyncStrategy.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncStrategy") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncStrategy") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncOperation) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncOperation) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncOperation - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_operation_resource.go b/pkg/argocd/models/v1alpha1_sync_operation_resource.go deleted file mode 100644 index c987100..0000000 --- a/pkg/argocd/models/v1alpha1_sync_operation_resource.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncOperationResource SyncOperationResource contains resources to sync. -// -// swagger:model v1alpha1SyncOperationResource -type V1alpha1SyncOperationResource struct { - - // group - Group string `json:"group,omitempty"` - - // kind - Kind string `json:"kind,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // namespace - Namespace string `json:"namespace,omitempty"` -} - -// Validate validates this v1alpha1 sync operation resource -func (m *V1alpha1SyncOperationResource) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 sync operation resource based on context it is used -func (m *V1alpha1SyncOperationResource) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncOperationResource) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncOperationResource) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncOperationResource - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_operation_result.go b/pkg/argocd/models/v1alpha1_sync_operation_result.go deleted file mode 100644 index 2b37225..0000000 --- a/pkg/argocd/models/v1alpha1_sync_operation_result.go +++ /dev/null @@ -1,291 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncOperationResult SyncOperationResult represent result of sync operation -// -// swagger:model v1alpha1SyncOperationResult -type V1alpha1SyncOperationResult struct { - - // managed namespace metadata - ManagedNamespaceMetadata *V1alpha1ManagedNamespaceMetadata `json:"managedNamespaceMetadata,omitempty"` - - // Resources contains a list of sync result items for each individual resource in a sync operation - Resources []*V1alpha1ResourceResult `json:"resources"` - - // Revision holds the revision this sync operation was performed to - Revision string `json:"revision,omitempty"` - - // Revisions holds the revision this sync operation was performed for respective indexed source in sources field - Revisions []string `json:"revisions"` - - // source - Source *V1alpha1ApplicationSource `json:"source,omitempty"` - - // Source records the application source information of the sync, used for comparing auto-sync - Sources []*V1alpha1ApplicationSource `json:"sources"` -} - -// Validate validates this v1alpha1 sync operation result -func (m *V1alpha1SyncOperationResult) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateManagedNamespaceMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateResources(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSource(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSources(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncOperationResult) validateManagedNamespaceMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ManagedNamespaceMetadata) { // not required - return nil - } - - if m.ManagedNamespaceMetadata != nil { - if err := m.ManagedNamespaceMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managedNamespaceMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managedNamespaceMetadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncOperationResult) validateResources(formats strfmt.Registry) error { - if swag.IsZero(m.Resources) { // not required - return nil - } - - for i := 0; i < len(m.Resources); i++ { - if swag.IsZero(m.Resources[i]) { // not required - continue - } - - if m.Resources[i] != nil { - if err := m.Resources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SyncOperationResult) validateSource(formats strfmt.Registry) error { - if swag.IsZero(m.Source) { // not required - return nil - } - - if m.Source != nil { - if err := m.Source.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncOperationResult) validateSources(formats strfmt.Registry) error { - if swag.IsZero(m.Sources) { // not required - return nil - } - - for i := 0; i < len(m.Sources); i++ { - if swag.IsZero(m.Sources[i]) { // not required - continue - } - - if m.Sources[i] != nil { - if err := m.Sources[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this v1alpha1 sync operation result based on the context it is used -func (m *V1alpha1SyncOperationResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateManagedNamespaceMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateResources(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSource(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateSources(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncOperationResult) contextValidateManagedNamespaceMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ManagedNamespaceMetadata != nil { - - if swag.IsZero(m.ManagedNamespaceMetadata) { // not required - return nil - } - - if err := m.ManagedNamespaceMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managedNamespaceMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managedNamespaceMetadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncOperationResult) contextValidateResources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Resources); i++ { - - if m.Resources[i] != nil { - - if swag.IsZero(m.Resources[i]) { // not required - return nil - } - - if err := m.Resources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("resources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("resources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *V1alpha1SyncOperationResult) contextValidateSource(ctx context.Context, formats strfmt.Registry) error { - - if m.Source != nil { - - if swag.IsZero(m.Source) { // not required - return nil - } - - if err := m.Source.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("source") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("source") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncOperationResult) contextValidateSources(ctx context.Context, formats strfmt.Registry) error { - - for i := 0; i < len(m.Sources); i++ { - - if m.Sources[i] != nil { - - if swag.IsZero(m.Sources[i]) { // not required - return nil - } - - if err := m.Sources[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("sources" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("sources" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncOperationResult) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncOperationResult) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncOperationResult - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_policy.go b/pkg/argocd/models/v1alpha1_sync_policy.go deleted file mode 100644 index 8336dd2..0000000 --- a/pkg/argocd/models/v1alpha1_sync_policy.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncPolicy SyncPolicy controls when a sync will be performed in response to updates in git -// -// swagger:model v1alpha1SyncPolicy -type V1alpha1SyncPolicy struct { - - // automated - Automated *V1alpha1SyncPolicyAutomated `json:"automated,omitempty"` - - // managed namespace metadata - ManagedNamespaceMetadata *V1alpha1ManagedNamespaceMetadata `json:"managedNamespaceMetadata,omitempty"` - - // retry - Retry *V1alpha1RetryStrategy `json:"retry,omitempty"` - - // Options allow you to specify whole app sync-options - SyncOptions []string `json:"syncOptions"` -} - -// Validate validates this v1alpha1 sync policy -func (m *V1alpha1SyncPolicy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAutomated(formats); err != nil { - res = append(res, err) - } - - if err := m.validateManagedNamespaceMetadata(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRetry(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncPolicy) validateAutomated(formats strfmt.Registry) error { - if swag.IsZero(m.Automated) { // not required - return nil - } - - if m.Automated != nil { - if err := m.Automated.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("automated") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("automated") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncPolicy) validateManagedNamespaceMetadata(formats strfmt.Registry) error { - if swag.IsZero(m.ManagedNamespaceMetadata) { // not required - return nil - } - - if m.ManagedNamespaceMetadata != nil { - if err := m.ManagedNamespaceMetadata.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managedNamespaceMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managedNamespaceMetadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncPolicy) validateRetry(formats strfmt.Registry) error { - if swag.IsZero(m.Retry) { // not required - return nil - } - - if m.Retry != nil { - if err := m.Retry.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retry") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retry") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 sync policy based on the context it is used -func (m *V1alpha1SyncPolicy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateAutomated(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateManagedNamespaceMetadata(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateRetry(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncPolicy) contextValidateAutomated(ctx context.Context, formats strfmt.Registry) error { - - if m.Automated != nil { - - if swag.IsZero(m.Automated) { // not required - return nil - } - - if err := m.Automated.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("automated") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("automated") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncPolicy) contextValidateManagedNamespaceMetadata(ctx context.Context, formats strfmt.Registry) error { - - if m.ManagedNamespaceMetadata != nil { - - if swag.IsZero(m.ManagedNamespaceMetadata) { // not required - return nil - } - - if err := m.ManagedNamespaceMetadata.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("managedNamespaceMetadata") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("managedNamespaceMetadata") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncPolicy) contextValidateRetry(ctx context.Context, formats strfmt.Registry) error { - - if m.Retry != nil { - - if swag.IsZero(m.Retry) { // not required - return nil - } - - if err := m.Retry.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("retry") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("retry") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncPolicy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncPolicy) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncPolicy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_policy_automated.go b/pkg/argocd/models/v1alpha1_sync_policy_automated.go deleted file mode 100644 index 86d83d5..0000000 --- a/pkg/argocd/models/v1alpha1_sync_policy_automated.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncPolicyAutomated SyncPolicyAutomated controls the behavior of an automated sync -// -// swagger:model v1alpha1SyncPolicyAutomated -type V1alpha1SyncPolicyAutomated struct { - - // AllowEmpty allows apps have zero live resources (default: false) - AllowEmpty bool `json:"allowEmpty,omitempty"` - - // Prune specifies whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync (default: false) - Prune bool `json:"prune,omitempty"` - - // SelfHeal specifies whether to revert resources back to their desired state upon modification in the cluster (default: false) - SelfHeal bool `json:"selfHeal,omitempty"` -} - -// Validate validates this v1alpha1 sync policy automated -func (m *V1alpha1SyncPolicyAutomated) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 sync policy automated based on context it is used -func (m *V1alpha1SyncPolicyAutomated) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncPolicyAutomated) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncPolicyAutomated) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncPolicyAutomated - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_status.go b/pkg/argocd/models/v1alpha1_sync_status.go deleted file mode 100644 index ccf9b4c..0000000 --- a/pkg/argocd/models/v1alpha1_sync_status.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncStatus SyncStatus contains information about the currently observed live and desired states of an application -// -// swagger:model v1alpha1SyncStatus -type V1alpha1SyncStatus struct { - - // compared to - ComparedTo *V1alpha1ComparedTo `json:"comparedTo,omitempty"` - - // Revision contains information about the revision the comparison has been performed to - Revision string `json:"revision,omitempty"` - - // Revisions contains information about the revisions of multiple sources the comparison has been performed to - Revisions []string `json:"revisions"` - - // Status is the sync state of the comparison - Status string `json:"status,omitempty"` -} - -// Validate validates this v1alpha1 sync status -func (m *V1alpha1SyncStatus) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateComparedTo(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncStatus) validateComparedTo(formats strfmt.Registry) error { - if swag.IsZero(m.ComparedTo) { // not required - return nil - } - - if m.ComparedTo != nil { - if err := m.ComparedTo.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("comparedTo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("comparedTo") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 sync status based on the context it is used -func (m *V1alpha1SyncStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateComparedTo(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncStatus) contextValidateComparedTo(ctx context.Context, formats strfmt.Registry) error { - - if m.ComparedTo != nil { - - if swag.IsZero(m.ComparedTo) { // not required - return nil - } - - if err := m.ComparedTo.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("comparedTo") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("comparedTo") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncStatus) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncStatus) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncStatus - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_strategy.go b/pkg/argocd/models/v1alpha1_sync_strategy.go deleted file mode 100644 index 93359d9..0000000 --- a/pkg/argocd/models/v1alpha1_sync_strategy.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncStrategy SyncStrategy controls the manner in which a sync is performed -// -// swagger:model v1alpha1SyncStrategy -type V1alpha1SyncStrategy struct { - - // apply - Apply *V1alpha1SyncStrategyApply `json:"apply,omitempty"` - - // hook - Hook *V1alpha1SyncStrategyHook `json:"hook,omitempty"` -} - -// Validate validates this v1alpha1 sync strategy -func (m *V1alpha1SyncStrategy) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateApply(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHook(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncStrategy) validateApply(formats strfmt.Registry) error { - if swag.IsZero(m.Apply) { // not required - return nil - } - - if m.Apply != nil { - if err := m.Apply.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apply") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apply") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncStrategy) validateHook(formats strfmt.Registry) error { - if swag.IsZero(m.Hook) { // not required - return nil - } - - if m.Hook != nil { - if err := m.Hook.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hook") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hook") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 sync strategy based on the context it is used -func (m *V1alpha1SyncStrategy) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateApply(ctx, formats); err != nil { - res = append(res, err) - } - - if err := m.contextValidateHook(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncStrategy) contextValidateApply(ctx context.Context, formats strfmt.Registry) error { - - if m.Apply != nil { - - if swag.IsZero(m.Apply) { // not required - return nil - } - - if err := m.Apply.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("apply") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("apply") - } - return err - } - } - - return nil -} - -func (m *V1alpha1SyncStrategy) contextValidateHook(ctx context.Context, formats strfmt.Registry) error { - - if m.Hook != nil { - - if swag.IsZero(m.Hook) { // not required - return nil - } - - if err := m.Hook.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hook") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("hook") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncStrategy) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncStrategy) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncStrategy - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_strategy_apply.go b/pkg/argocd/models/v1alpha1_sync_strategy_apply.go deleted file mode 100644 index 398618a..0000000 --- a/pkg/argocd/models/v1alpha1_sync_strategy_apply.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncStrategyApply SyncStrategyApply uses `kubectl apply` to perform the apply -// -// swagger:model v1alpha1SyncStrategyApply -type V1alpha1SyncStrategyApply struct { - - // Force indicates whether or not to supply the --force flag to `kubectl apply`. - // The --force flag deletes and re-create the resource, when PATCH encounters conflict and has - // retried for 5 times. - Force bool `json:"force,omitempty"` -} - -// Validate validates this v1alpha1 sync strategy apply -func (m *V1alpha1SyncStrategyApply) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 sync strategy apply based on context it is used -func (m *V1alpha1SyncStrategyApply) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncStrategyApply) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncStrategyApply) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncStrategyApply - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_strategy_hook.go b/pkg/argocd/models/v1alpha1_sync_strategy_hook.go deleted file mode 100644 index c91abc9..0000000 --- a/pkg/argocd/models/v1alpha1_sync_strategy_hook.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncStrategyHook SyncStrategyHook will perform a sync using hooks annotations. -// If no hook annotation is specified falls back to `kubectl apply`. -// -// swagger:model v1alpha1SyncStrategyHook -type V1alpha1SyncStrategyHook struct { - - // sync strategy apply - SyncStrategyApply *V1alpha1SyncStrategyApply `json:"syncStrategyApply,omitempty"` -} - -// Validate validates this v1alpha1 sync strategy hook -func (m *V1alpha1SyncStrategyHook) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSyncStrategyApply(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncStrategyHook) validateSyncStrategyApply(formats strfmt.Registry) error { - if swag.IsZero(m.SyncStrategyApply) { // not required - return nil - } - - if m.SyncStrategyApply != nil { - if err := m.SyncStrategyApply.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncStrategyApply") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncStrategyApply") - } - return err - } - } - - return nil -} - -// ContextValidate validate this v1alpha1 sync strategy hook based on the context it is used -func (m *V1alpha1SyncStrategyHook) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateSyncStrategyApply(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *V1alpha1SyncStrategyHook) contextValidateSyncStrategyApply(ctx context.Context, formats strfmt.Registry) error { - - if m.SyncStrategyApply != nil { - - if swag.IsZero(m.SyncStrategyApply) { // not required - return nil - } - - if err := m.SyncStrategyApply.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("syncStrategyApply") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("syncStrategyApply") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncStrategyHook) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncStrategyHook) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncStrategyHook - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_sync_window.go b/pkg/argocd/models/v1alpha1_sync_window.go deleted file mode 100644 index c574f40..0000000 --- a/pkg/argocd/models/v1alpha1_sync_window.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1SyncWindow SyncWindow contains the kind, time, duration and attributes that are used to assign the syncWindows to apps -// -// swagger:model v1alpha1SyncWindow -type V1alpha1SyncWindow struct { - - // Applications contains a list of applications that the window will apply to - Applications []string `json:"applications"` - - // Clusters contains a list of clusters that the window will apply to - Clusters []string `json:"clusters"` - - // Duration is the amount of time the sync window will be open - Duration string `json:"duration,omitempty"` - - // Kind defines if the window allows or blocks syncs - Kind string `json:"kind,omitempty"` - - // ManualSync enables manual syncs when they would otherwise be blocked - ManualSync bool `json:"manualSync,omitempty"` - - // Namespaces contains a list of namespaces that the window will apply to - Namespaces []string `json:"namespaces"` - - // Schedule is the time the window will begin, specified in cron format - Schedule string `json:"schedule,omitempty"` - - // TimeZone of the sync that will be applied to the schedule - TimeZone string `json:"timeZone,omitempty"` -} - -// Validate validates this v1alpha1 sync window -func (m *V1alpha1SyncWindow) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 sync window based on context it is used -func (m *V1alpha1SyncWindow) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1SyncWindow) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1SyncWindow) UnmarshalBinary(b []byte) error { - var res V1alpha1SyncWindow - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_tag_filter.go b/pkg/argocd/models/v1alpha1_tag_filter.go deleted file mode 100644 index e5d49a7..0000000 --- a/pkg/argocd/models/v1alpha1_tag_filter.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1TagFilter v1alpha1 tag filter -// -// swagger:model v1alpha1TagFilter -type V1alpha1TagFilter struct { - - // key - Key string `json:"key,omitempty"` - - // value - Value string `json:"value,omitempty"` -} - -// Validate validates this v1alpha1 tag filter -func (m *V1alpha1TagFilter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 tag filter based on context it is used -func (m *V1alpha1TagFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1TagFilter) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1TagFilter) UnmarshalBinary(b []byte) error { - var res V1alpha1TagFilter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/v1alpha1_tls_client_config.go b/pkg/argocd/models/v1alpha1_tls_client_config.go deleted file mode 100644 index fcf2062..0000000 --- a/pkg/argocd/models/v1alpha1_tls_client_config.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// V1alpha1TLSClientConfig TLSClientConfig contains settings to enable transport layer security -// -// swagger:model v1alpha1TLSClientConfig -type V1alpha1TLSClientConfig struct { - - // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). - // CAData takes precedence over CAFile - // Format: byte - CaData strfmt.Base64 `json:"caData,omitempty"` - - // CertData holds PEM-encoded bytes (typically read from a client certificate file). - // CertData takes precedence over CertFile - // Format: byte - CertData strfmt.Base64 `json:"certData,omitempty"` - - // Insecure specifies that the server should be accessed without verifying the TLS certificate. For testing only. - Insecure bool `json:"insecure,omitempty"` - - // KeyData holds PEM-encoded bytes (typically read from a client certificate key file). - // KeyData takes precedence over KeyFile - // Format: byte - KeyData strfmt.Base64 `json:"keyData,omitempty"` - - // ServerName is passed to the server for SNI and is used in the client to check server - // certificates against. If ServerName is empty, the hostname used to contact the - // server is used. - ServerName string `json:"serverName,omitempty"` -} - -// Validate validates this v1alpha1 TLS client config -func (m *V1alpha1TLSClientConfig) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this v1alpha1 TLS client config based on context it is used -func (m *V1alpha1TLSClientConfig) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *V1alpha1TLSClientConfig) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *V1alpha1TLSClientConfig) UnmarshalBinary(b []byte) error { - var res V1alpha1TLSClientConfig - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/argocd/models/version_version_message.go b/pkg/argocd/models/version_version_message.go deleted file mode 100644 index 5a74fe1..0000000 --- a/pkg/argocd/models/version_version_message.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// VersionVersionMessage VersionMessage represents version of the Argo CD API server -// -// swagger:model versionVersionMessage -type VersionVersionMessage struct { - - // build date - BuildDate string `json:"BuildDate,omitempty"` - - // compiler - Compiler string `json:"Compiler,omitempty"` - - // extra build info - ExtraBuildInfo string `json:"ExtraBuildInfo,omitempty"` - - // git commit - GitCommit string `json:"GitCommit,omitempty"` - - // git tag - GitTag string `json:"GitTag,omitempty"` - - // git tree state - GitTreeState string `json:"GitTreeState,omitempty"` - - // go version - GoVersion string `json:"GoVersion,omitempty"` - - // helm version - HelmVersion string `json:"HelmVersion,omitempty"` - - // jsonnet version - JsonnetVersion string `json:"JsonnetVersion,omitempty"` - - // kubectl version - KubectlVersion string `json:"KubectlVersion,omitempty"` - - // kustomize version - KustomizeVersion string `json:"KustomizeVersion,omitempty"` - - // platform - Platform string `json:"Platform,omitempty"` - - // version - Version string `json:"Version,omitempty"` -} - -// Validate validates this version version message -func (m *VersionVersionMessage) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this version version message based on context it is used -func (m *VersionVersionMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *VersionVersionMessage) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *VersionVersionMessage) UnmarshalBinary(b []byte) error { - var res VersionVersionMessage - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/events/application_resolver.go b/pkg/events/application_resolver.go index e49cea8..7cb3e07 100644 --- a/pkg/events/application_resolver.go +++ b/pkg/events/application_resolver.go @@ -42,7 +42,9 @@ func (a *ApplicationResolver) FindApplicationNames(ctx context.Context, command for _, app := range apps.Items { path := app.Spec.Source.Path - name := app.Metadata.Name + name := app.Name + // name := app.Metadata.Name + // app.Name a.Log.Debug(fmt.Sprintf("name: %s | path: %s", name, path)) for _, file := range modified { diff --git a/version b/version index ac39a10..78bc1ab 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.9.0 +0.10.0