// SPDX-License-Identifier: AGPL-3.0-only // Code generated by applyconfiguration-gen. DO NOT EDIT. package v0alpha1 import ( provisioningv0alpha1 "github.com/grafana/grafana/pkg/apis/provisioning/v0alpha1" ) // RepositorySpecApplyConfiguration represents a declarative configuration of the RepositorySpec type for use // with apply. type RepositorySpecApplyConfiguration struct { Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` Workflows []provisioningv0alpha1.Workflow `json:"workflows,omitempty"` Sync *SyncOptionsApplyConfiguration `json:"sync,omitempty"` Type *provisioningv0alpha1.RepositoryType `json:"type,omitempty"` Local *LocalRepositoryConfigApplyConfiguration `json:"local,omitempty"` GitHub *GitHubRepositoryConfigApplyConfiguration `json:"github,omitempty"` Git *GitRepositoryConfigApplyConfiguration `json:"git,omitempty"` Bitbucket *BitbucketRepositoryConfigApplyConfiguration `json:"bitbucket,omitempty"` GitLab *GitLabRepositoryConfigApplyConfiguration `json:"gitlab,omitempty"` } // RepositorySpecApplyConfiguration constructs a declarative configuration of the RepositorySpec type for use with // apply. func RepositorySpec() *RepositorySpecApplyConfiguration { return &RepositorySpecApplyConfiguration{} } // WithTitle sets the Title field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Title field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithTitle(value string) *RepositorySpecApplyConfiguration { b.Title = &value return b } // WithDescription sets the Description field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Description field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithDescription(value string) *RepositorySpecApplyConfiguration { b.Description = &value return b } // WithWorkflows adds the given value to the Workflows field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Workflows field. func (b *RepositorySpecApplyConfiguration) WithWorkflows(values ...provisioningv0alpha1.Workflow) *RepositorySpecApplyConfiguration { for i := range values { b.Workflows = append(b.Workflows, values[i]) } return b } // WithSync sets the Sync field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Sync field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithSync(value *SyncOptionsApplyConfiguration) *RepositorySpecApplyConfiguration { b.Sync = value return b } // WithType sets the Type field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Type field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithType(value provisioningv0alpha1.RepositoryType) *RepositorySpecApplyConfiguration { b.Type = &value return b } // WithLocal sets the Local field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Local field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithLocal(value *LocalRepositoryConfigApplyConfiguration) *RepositorySpecApplyConfiguration { b.Local = value return b } // WithGitHub sets the GitHub field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GitHub field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithGitHub(value *GitHubRepositoryConfigApplyConfiguration) *RepositorySpecApplyConfiguration { b.GitHub = value return b } // WithGit sets the Git field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Git field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithGit(value *GitRepositoryConfigApplyConfiguration) *RepositorySpecApplyConfiguration { b.Git = value return b } // WithBitbucket sets the Bitbucket field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Bitbucket field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithBitbucket(value *BitbucketRepositoryConfigApplyConfiguration) *RepositorySpecApplyConfiguration { b.Bitbucket = value return b } // WithGitLab sets the GitLab field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GitLab field is set to the value of the last call. func (b *RepositorySpecApplyConfiguration) WithGitLab(value *GitLabRepositoryConfigApplyConfiguration) *RepositorySpecApplyConfiguration { b.GitLab = value return b }