mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-18 08:58:30 +00:00
Add support for lookaside rpm import, introduce CLI and machine-to-machine callers support
Signed-off-by: Mustafa Gezen <mustafa@ctrliq.com>
This commit is contained in:
parent
e205ea33b8
commit
496b60ba44
@ -54,7 +54,7 @@ go_rules_dependencies()
|
||||
|
||||
go_register_toolchains(
|
||||
nogo = "@peridot//:nogo",
|
||||
version = "1.17.7",
|
||||
version = "1.18.3",
|
||||
)
|
||||
|
||||
go_repository(
|
||||
@ -164,10 +164,10 @@ go_repositories()
|
||||
# --start protoc_gen_validate--
|
||||
http_archive(
|
||||
name = "com_envoyproxy_protoc_gen_validate",
|
||||
sha256 = "51ba05210a1a2940530455e01c010daa26d504f4b14855a452716772ea39090c",
|
||||
strip_prefix = "protoc-gen-validate-0.6.3",
|
||||
sha256 = "4c692c62e16c168049bca2b2972b0a25222870cf53e61be30b50d761e58728bd",
|
||||
strip_prefix = "protoc-gen-validate-0.6.7",
|
||||
urls = [
|
||||
"https://github.com/envoyproxy/protoc-gen-validate/archive/v0.6.3.tar.gz",
|
||||
"https://github.com/envoyproxy/protoc-gen-validate/archive/v0.6.7.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
6
go.mod
6
go.mod
@ -55,6 +55,7 @@ require (
|
||||
k8s.io/api v0.22.1
|
||||
k8s.io/apimachinery v0.22.1
|
||||
k8s.io/client-go v0.22.1
|
||||
openapi.peridot.resf.org/peridotopenapi v0.0.0-00010101000000-000000000000 // indirect
|
||||
peridot.resf.org/common v0.0.0-00010101000000-000000000000
|
||||
peridot.resf.org/obsidian/pb v0.0.0-00010101000000-000000000000
|
||||
peridot.resf.org/peridot/keykeeper/pb v0.0.0-00010101000000-000000000000
|
||||
@ -65,7 +66,10 @@ require (
|
||||
)
|
||||
|
||||
// Manual replace
|
||||
replace github.com/dgrijalva/jwt-go v3.2.0+incompatible => github.com/golang-jwt/jwt/v4 v4.4.2
|
||||
replace (
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible => github.com/golang-jwt/jwt/v4 v4.4.2
|
||||
openapi.peridot.resf.org/peridotopenapi => ./bazel-bin/peridot/proto/v1/client_go
|
||||
)
|
||||
|
||||
// sync-replace-start
|
||||
replace (
|
||||
|
1
go.sum
1
go.sum
@ -849,6 +849,7 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw=
|
||||
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -64,11 +64,16 @@ func init() {
|
||||
|
||||
pf := root.PersistentFlags()
|
||||
pf.String("target.db", "", "target db to initialize")
|
||||
pf.Bool("skip", false, "Whether to skip InitDB without removing it as an init container")
|
||||
|
||||
utils.AddFlags(pf, cnf)
|
||||
}
|
||||
|
||||
func mn(_ *cobra.Command, _ []string) {
|
||||
if viper.GetBool("skip") {
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
ctx := context.TODO()
|
||||
|
||||
targetDB := viper.GetString("target.db")
|
||||
|
@ -61,6 +61,9 @@ func callbackForwarder(callbackURL string) string {
|
||||
// this section contained a callback forwarder, but cannot be published
|
||||
// todo(mustafa): evaluate other ways to make it easier for dev
|
||||
if env == "dev" || env == "" {
|
||||
if fwd := os.Getenv("OBSIDIAN_CALLBACK_FORWARDER"); fwd != "" {
|
||||
return fmt.Sprintf("%s/%s", fwd, callbackURL)
|
||||
}
|
||||
return callbackURL
|
||||
}
|
||||
return callbackURL
|
||||
|
@ -8,6 +8,7 @@ go_library(
|
||||
"hashed_repositories.go",
|
||||
"import.go",
|
||||
"infrastructure.go",
|
||||
"lookaside.go",
|
||||
"module.go",
|
||||
"rpmimport.go",
|
||||
"srpm.go",
|
||||
|
@ -612,7 +612,7 @@ func (c *Controller) BuildWorkflow(ctx workflow.Context, req *peridotpb.SubmitBu
|
||||
return nil, err
|
||||
}
|
||||
|
||||
subtask, err := c.db.GetTask(uploadSRPMResult.Subtask.ID.String(), project.ID.String())
|
||||
subtask, err := c.db.GetTask(uploadSRPMResult.Subtask.ID.String(), utils.Pointer(project.ID.String()))
|
||||
if err != nil {
|
||||
setInternalError(errorDetails, err)
|
||||
return nil, err
|
||||
@ -721,7 +721,7 @@ func (c *Controller) BuildWorkflow(ctx workflow.Context, req *peridotpb.SubmitBu
|
||||
if result.Skip {
|
||||
continue
|
||||
}
|
||||
subtask, err := c.db.GetTask(result.Subtask.ID.String(), project.ID.String())
|
||||
subtask, err := c.db.GetTask(result.Subtask.ID.String(), utils.Pointer(project.ID.String()))
|
||||
if err != nil {
|
||||
ret.err = fmt.Errorf("failed to get task: %s", err)
|
||||
return
|
||||
|
@ -54,6 +54,7 @@ import (
|
||||
"peridot.resf.org/peridot/db/models"
|
||||
peridotpb "peridot.resf.org/peridot/pb"
|
||||
"peridot.resf.org/utils"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
@ -78,6 +79,19 @@ func archToGoArch(arch string) string {
|
||||
return arch
|
||||
}
|
||||
|
||||
func goArchToArch(arch string) string {
|
||||
switch arch {
|
||||
case "arm64":
|
||||
return "aarch64"
|
||||
case "ppc64le":
|
||||
return "ppc64le"
|
||||
case "s390x":
|
||||
return "s390x"
|
||||
default:
|
||||
return "x86_64"
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Controller) genNameWorker(buildID, purpose string) string {
|
||||
return strings.ReplaceAll(fmt.Sprintf("pb-%s-%s", buildID, purpose), "_", "-")
|
||||
}
|
||||
@ -89,13 +103,20 @@ func (c *Controller) genNameWorker(buildID, purpose string) string {
|
||||
func (c *Controller) provisionWorker(ctx workflow.Context, req *ProvisionWorkerRequest) (string, func(), error) {
|
||||
queue := c.mainQueue
|
||||
|
||||
projects, err := c.db.ListProjects(&peridotpb.ProjectFilters{
|
||||
Id: wrapperspb.String(req.ProjectId),
|
||||
})
|
||||
if err != nil {
|
||||
return "", nil, fmt.Errorf("could not list projects: %v", err)
|
||||
var project *models.Project
|
||||
if req.ProjectId != "" {
|
||||
projects, err := c.db.ListProjects(&peridotpb.ProjectFilters{
|
||||
Id: wrapperspb.String(req.ProjectId),
|
||||
})
|
||||
if err != nil {
|
||||
return "", nil, fmt.Errorf("could not list projects: %v", err)
|
||||
}
|
||||
project = &projects[0]
|
||||
} else {
|
||||
project = &models.Project{
|
||||
Archs: []string{goArchToArch(runtime.GOARCH)},
|
||||
}
|
||||
}
|
||||
project := projects[0]
|
||||
|
||||
// Normalize arch string
|
||||
imageArch := req.Arch
|
||||
@ -149,7 +170,7 @@ func (c *Controller) provisionWorker(ctx workflow.Context, req *ProvisionWorkerR
|
||||
ctx = workflow.WithChildOptions(ctx, workflow.ChildWorkflowOptions{
|
||||
TaskQueue: queue,
|
||||
})
|
||||
err = workflow.ExecuteChildWorkflow(ctx, c.ProvisionWorkerWorkflow, req, queue, imageArch).Get(ctx, &podName)
|
||||
err := workflow.ExecuteChildWorkflow(ctx, c.ProvisionWorkerWorkflow, req, queue, imageArch).Get(ctx, &podName)
|
||||
if err != nil {
|
||||
var applicationErr *temporal.ApplicationError
|
||||
if errors.As(err, &applicationErr) {
|
||||
@ -181,7 +202,11 @@ func (c *Controller) provisionWorker(ctx workflow.Context, req *ProvisionWorkerR
|
||||
func (c *Controller) ProvisionWorkerWorkflow(ctx workflow.Context, req *ProvisionWorkerRequest, queue string, imageArch string) (string, error) {
|
||||
var task models.Task
|
||||
taskSideEffect := workflow.SideEffect(ctx, func(ctx workflow.Context) interface{} {
|
||||
task, err := c.db.CreateTask(nil, "noarch", peridotpb.TaskType_TASK_TYPE_WORKER_PROVISION, &req.ProjectId, &req.TaskId)
|
||||
var projectId *string
|
||||
if req.ProjectId != "" {
|
||||
projectId = &req.ProjectId
|
||||
}
|
||||
task, err := c.db.CreateTask(nil, "noarch", peridotpb.TaskType_TASK_TYPE_WORKER_PROVISION, projectId, &req.TaskId)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
@ -192,7 +217,7 @@ func (c *Controller) ProvisionWorkerWorkflow(ctx workflow.Context, req *Provisio
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if !task.ProjectId.Valid {
|
||||
if task.ID.String() == "" {
|
||||
return "", fmt.Errorf("could not create task")
|
||||
}
|
||||
|
||||
@ -234,7 +259,11 @@ func (c *Controller) ProvisionWorkerWorkflow(ctx workflow.Context, req *Provisio
|
||||
func (c *Controller) DestroyWorkerWorkflow(ctx workflow.Context, req *ProvisionWorkerRequest) error {
|
||||
var task models.Task
|
||||
taskSideEffect := workflow.SideEffect(ctx, func(ctx workflow.Context) interface{} {
|
||||
task, err := c.db.CreateTask(nil, "noarch", peridotpb.TaskType_TASK_TYPE_WORKER_DESTROY, &req.ProjectId, &req.TaskId)
|
||||
var projectId *string
|
||||
if req.ProjectId != "" {
|
||||
projectId = &req.ProjectId
|
||||
}
|
||||
task, err := c.db.CreateTask(nil, "noarch", peridotpb.TaskType_TASK_TYPE_WORKER_DESTROY, projectId, &req.TaskId)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
@ -245,7 +274,7 @@ func (c *Controller) DestroyWorkerWorkflow(ctx workflow.Context, req *ProvisionW
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !task.ProjectId.Valid {
|
||||
if task.ID.String() == "" {
|
||||
return fmt.Errorf("could not create task")
|
||||
}
|
||||
|
||||
@ -570,6 +599,10 @@ func (c *Controller) CreateK8sPodActivity(ctx context.Context, req *ProvisionWor
|
||||
Name: "BYC_NS",
|
||||
Value: os.Getenv("BYC_NS"),
|
||||
},
|
||||
{
|
||||
Name: "BYC_FORCE_NS",
|
||||
Value: os.Getenv("BYC_FORCE_NS"),
|
||||
},
|
||||
{
|
||||
Name: "LOCALSTACK_ENDPOINT",
|
||||
Value: os.Getenv("LOCALSTACK_ENDPOINT"),
|
||||
|
128
peridot/builder/v1/workflow/lookaside.go
Normal file
128
peridot/builder/v1/workflow/lookaside.go
Normal file
@ -0,0 +1,128 @@
|
||||
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package workflow
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"go.temporal.io/sdk/activity"
|
||||
"go.temporal.io/sdk/temporal"
|
||||
"go.temporal.io/sdk/workflow"
|
||||
"peridot.resf.org/peridot/db/models"
|
||||
peridotpb "peridot.resf.org/peridot/pb"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func (c *Controller) LookasideFileUploadWorkflow(ctx workflow.Context, req *peridotpb.LookasideFileUploadRequest, task *models.Task) (*peridotpb.LookasideFileUploadTask, error) {
|
||||
ret := &peridotpb.LookasideFileUploadTask{}
|
||||
deferTask, errorDetails, err := c.commonCreateTask(task, ret)
|
||||
defer deferTask()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
task.Status = peridotpb.TaskStatus_TASK_STATUS_FAILED
|
||||
|
||||
uploadTaskQueue, cleanupWorker, err := c.provisionWorker(ctx, &ProvisionWorkerRequest{
|
||||
TaskId: task.ID.String(),
|
||||
ParentTaskId: task.ParentTaskId,
|
||||
Purpose: "lookaside",
|
||||
Arch: "noarch",
|
||||
})
|
||||
if err != nil {
|
||||
setInternalError(errorDetails, err)
|
||||
return nil, err
|
||||
}
|
||||
defer cleanupWorker()
|
||||
|
||||
uploadCtx := workflow.WithActivityOptions(ctx, workflow.ActivityOptions{
|
||||
StartToCloseTimeout: time.Hour,
|
||||
HeartbeatTimeout: 20 * time.Second,
|
||||
TaskQueue: uploadTaskQueue,
|
||||
RetryPolicy: &temporal.RetryPolicy{
|
||||
MaximumAttempts: 1,
|
||||
},
|
||||
})
|
||||
err = workflow.ExecuteActivity(uploadCtx, c.LookasideFileUploadActivity, req, task.ID.String()).Get(ctx, ret)
|
||||
if err != nil {
|
||||
setActivityError(errorDetails, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
task.Status = peridotpb.TaskStatus_TASK_STATUS_SUCCEEDED
|
||||
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (c *Controller) LookasideFileUploadActivity(ctx context.Context, req *peridotpb.LookasideFileUploadRequest, taskID string) (*peridotpb.LookasideFileUploadTask, error) {
|
||||
go func() {
|
||||
for {
|
||||
activity.RecordHeartbeat(ctx)
|
||||
time.Sleep(4 * time.Second)
|
||||
}
|
||||
}()
|
||||
|
||||
base64DecodedFile, err := base64.StdEncoding.DecodeString(req.File)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
hasher := sha256.New()
|
||||
_, err = hasher.Write(base64DecodedFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sha256Sum := hex.EncodeToString(hasher.Sum(nil))
|
||||
|
||||
exists, err := c.storage.Exists(sha256Sum)
|
||||
if err != nil {
|
||||
if !strings.Contains(err.Error(), "NotFound") {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if exists {
|
||||
return &peridotpb.LookasideFileUploadTask{
|
||||
Digest: sha256Sum,
|
||||
}, nil
|
||||
}
|
||||
|
||||
_, err = c.storage.PutObjectBytes(sha256Sum, base64DecodedFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &peridotpb.LookasideFileUploadTask{
|
||||
Digest: sha256Sum,
|
||||
}, nil
|
||||
}
|
@ -54,6 +54,7 @@ import (
|
||||
yumrepofspb "peridot.resf.org/peridot/yumrepofs/pb"
|
||||
"peridot.resf.org/secparse/rpmutils"
|
||||
"peridot.resf.org/utils"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -61,6 +62,11 @@ type RpmImportActivityTaskStage1 struct {
|
||||
Build *models.Build
|
||||
}
|
||||
|
||||
type RpmImportUploadWrapper struct {
|
||||
Upload *UploadActivityResult
|
||||
TaskID string
|
||||
}
|
||||
|
||||
func (c *Controller) RpmImportWorkflow(ctx workflow.Context, req *peridotpb.RpmImportRequest, task *models.Task) (*peridotpb.RpmImportTask, error) {
|
||||
var ret peridotpb.RpmImportTask
|
||||
deferTask, errorDetails, err := c.commonCreateTask(task, &ret)
|
||||
@ -93,7 +99,7 @@ func (c *Controller) RpmImportWorkflow(ctx workflow.Context, req *peridotpb.RpmI
|
||||
MaximumAttempts: 1,
|
||||
},
|
||||
})
|
||||
err = workflow.ExecuteActivity(importCtx, c.RpmImportActivity, req, task.ID.String()).Get(ctx, &importRes)
|
||||
err = workflow.ExecuteActivity(importCtx, c.RpmImportActivity, req, task.ID.String(), false).Get(ctx, &importRes)
|
||||
if err != nil {
|
||||
setActivityError(errorDetails, err)
|
||||
return nil, err
|
||||
@ -149,7 +155,139 @@ func (c *Controller) RpmImportWorkflow(ctx workflow.Context, req *peridotpb.RpmI
|
||||
return &ret, nil
|
||||
}
|
||||
|
||||
func (c *Controller) RpmImportActivity(ctx context.Context, req *peridotpb.RpmImportRequest, taskID string) (*RpmImportActivityTaskStage1, error) {
|
||||
func (c *Controller) RpmLookasideBatchImportWorkflow(ctx workflow.Context, req *peridotpb.RpmLookasideBatchImportRequest, task *models.Task) (*peridotpb.RpmLookasideBatchImportTask, error) {
|
||||
var ret peridotpb.RpmLookasideBatchImportTask
|
||||
deferTask, errorDetails, err := c.commonCreateTask(task, &ret)
|
||||
defer deferTask()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
task.Status = peridotpb.TaskStatus_TASK_STATUS_FAILED
|
||||
|
||||
importTaskQueue, cleanupWorker, err := c.provisionWorker(ctx, &ProvisionWorkerRequest{
|
||||
TaskId: task.ID.String(),
|
||||
ParentTaskId: task.ParentTaskId,
|
||||
Purpose: "batchrpmimport",
|
||||
Arch: "noarch",
|
||||
ProjectId: req.ProjectId,
|
||||
})
|
||||
if err != nil {
|
||||
setInternalError(errorDetails, err)
|
||||
return nil, err
|
||||
}
|
||||
defer cleanupWorker()
|
||||
|
||||
taskID := task.ID.String()
|
||||
var importResults []*RpmImportActivityTaskStage1
|
||||
var taskIDs []string
|
||||
taskIDBuildMap := map[string]*RpmImportActivityTaskStage1{}
|
||||
for _, blob := range req.LookasideBlobs {
|
||||
var archTask models.Task
|
||||
archTaskEffect := workflow.SideEffect(ctx, func(ctx workflow.Context) interface{} {
|
||||
newTask, err := c.db.CreateTask(nil, "noarch", peridotpb.TaskType_TASK_TYPE_RPM_IMPORT, &req.ProjectId, &taskID)
|
||||
if err != nil {
|
||||
return &models.Task{}
|
||||
}
|
||||
|
||||
_ = c.db.SetTaskStatus(newTask.ID.String(), peridotpb.TaskStatus_TASK_STATUS_RUNNING)
|
||||
return newTask
|
||||
})
|
||||
err := archTaskEffect.Get(&archTask)
|
||||
if err != nil || !archTask.ProjectId.Valid {
|
||||
return nil, fmt.Errorf("failed to create rpm task: %s", err)
|
||||
}
|
||||
taskIDs = append(taskIDs, archTask.ID.String())
|
||||
|
||||
var importRes RpmImportActivityTaskStage1
|
||||
importCtx := workflow.WithActivityOptions(ctx, workflow.ActivityOptions{
|
||||
StartToCloseTimeout: time.Hour,
|
||||
HeartbeatTimeout: 20 * time.Second,
|
||||
TaskQueue: importTaskQueue,
|
||||
RetryPolicy: &temporal.RetryPolicy{
|
||||
MaximumAttempts: 1,
|
||||
},
|
||||
})
|
||||
blobReq := &peridotpb.RpmImportRequest{
|
||||
ProjectId: req.ProjectId,
|
||||
Rpms: blob,
|
||||
ForceOverride: req.ForceOverride,
|
||||
}
|
||||
err = workflow.ExecuteActivity(importCtx, c.RpmImportActivity, blobReq, archTask.ID.String(), true).Get(ctx, &importRes)
|
||||
if err != nil {
|
||||
setActivityError(errorDetails, err)
|
||||
return nil, err
|
||||
}
|
||||
importResults = append(importResults, &importRes)
|
||||
taskIDBuildMap[archTask.ID.String()] = &importRes
|
||||
}
|
||||
|
||||
var res []*RpmImportUploadWrapper
|
||||
for _, importTaskID := range taskIDs {
|
||||
uploadArchCtx := workflow.WithActivityOptions(ctx, workflow.ActivityOptions{
|
||||
ScheduleToStartTimeout: 12 * time.Hour,
|
||||
StartToCloseTimeout: 24 * time.Hour,
|
||||
HeartbeatTimeout: 2 * time.Minute,
|
||||
TaskQueue: importTaskQueue,
|
||||
})
|
||||
|
||||
var interimRes []*UploadActivityResult
|
||||
err = workflow.ExecuteActivity(uploadArchCtx, c.UploadArchActivity, req.ProjectId, importTaskID).Get(ctx, &interimRes)
|
||||
if err != nil {
|
||||
setActivityError(errorDetails, err)
|
||||
return nil, err
|
||||
}
|
||||
for _, ires := range interimRes {
|
||||
res = append(res, &RpmImportUploadWrapper{
|
||||
Upload: ires,
|
||||
TaskID: importTaskID,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for _, result := range res {
|
||||
stage1 := taskIDBuildMap[result.TaskID]
|
||||
if stage1 == nil {
|
||||
return nil, fmt.Errorf("failed to find task %s", result.TaskID)
|
||||
}
|
||||
err = c.db.AttachTaskToBuild(stage1.Build.ID.String(), result.Upload.Subtask.ID.String())
|
||||
if err != nil {
|
||||
err = status.Errorf(codes.Internal, "could not attach task to build: %v", err)
|
||||
setInternalError(errorDetails, err)
|
||||
return nil, err
|
||||
}
|
||||
if result.Upload.Skip {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
yumrepoCtx := workflow.WithChildOptions(ctx, workflow.ChildWorkflowOptions{
|
||||
TaskQueue: "yumrepofs",
|
||||
})
|
||||
updateRepoRequest := &UpdateRepoRequest{
|
||||
ProjectID: req.ProjectId,
|
||||
BuildIDs: []string{},
|
||||
Delete: false,
|
||||
TaskID: &taskID,
|
||||
NoDeletePrevious: true,
|
||||
}
|
||||
for _, importRes := range importResults {
|
||||
updateRepoRequest.BuildIDs = append(updateRepoRequest.BuildIDs, importRes.Build.ID.String())
|
||||
}
|
||||
updateRepoTask := &yumrepofspb.UpdateRepoTask{}
|
||||
err = workflow.ExecuteChildWorkflow(yumrepoCtx, c.RepoUpdaterWorkflow, updateRepoRequest).Get(yumrepoCtx, updateRepoTask)
|
||||
if err != nil {
|
||||
setActivityError(errorDetails, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
task.Status = peridotpb.TaskStatus_TASK_STATUS_SUCCEEDED
|
||||
|
||||
ret.RepoChanges = updateRepoTask
|
||||
return &ret, nil
|
||||
}
|
||||
|
||||
func (c *Controller) RpmImportActivity(ctx context.Context, req *peridotpb.RpmImportRequest, taskID string, setTaskStatus bool) (*RpmImportActivityTaskStage1, error) {
|
||||
go func() {
|
||||
for {
|
||||
activity.RecordHeartbeat(ctx)
|
||||
@ -164,41 +302,65 @@ func (c *Controller) RpmImportActivity(ctx context.Context, req *peridotpb.RpmIm
|
||||
}
|
||||
buf.Write(bts)
|
||||
|
||||
c.log.Infof("Reading tar: %s", req.Rpms)
|
||||
|
||||
rpmBufs := map[string][]byte{}
|
||||
tr := tar.NewReader(&buf)
|
||||
for {
|
||||
hdr, err := tr.Next()
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var nBuf bytes.Buffer
|
||||
if _, err := io.Copy(&nBuf, tr); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.log.Infof("Detected RPM: %s", hdr.Name)
|
||||
rpmBufs[hdr.Name] = nBuf.Bytes()
|
||||
}
|
||||
var rpms []*rpm.Package
|
||||
for _, b := range rpmBufs {
|
||||
p, err := rpm.Read(bytes.NewBuffer(b))
|
||||
rpmBufs := map[string][]byte{}
|
||||
|
||||
if strings.HasSuffix(req.Rpms, ".tar") {
|
||||
c.log.Infof("Reading tar: %s", req.Rpms)
|
||||
|
||||
tr := tar.NewReader(&buf)
|
||||
for {
|
||||
hdr, err := tr.Next()
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var nBuf bytes.Buffer
|
||||
if _, err := io.Copy(&nBuf, tr); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
c.log.Infof("Detected RPM: %s", hdr.Name)
|
||||
rpmBufs[hdr.Name] = nBuf.Bytes()
|
||||
}
|
||||
for _, b := range rpmBufs {
|
||||
p, err := rpm.Read(bytes.NewBuffer(b))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rpms = append(rpms, p)
|
||||
}
|
||||
} else {
|
||||
c.log.Infof("Reading RPM: %s", req.Rpms)
|
||||
p, err := rpm.Read(&buf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rpms = append(rpms, p)
|
||||
|
||||
realName := p.String() + ".rpm"
|
||||
if p.SourceRPM() == "" && p.Architecture() == "i686" {
|
||||
realName = strings.ReplaceAll(realName, ".i686", ".src")
|
||||
}
|
||||
rpmBufs[realName] = bts
|
||||
}
|
||||
|
||||
var nvr string
|
||||
for _, rpmObj := range rpms {
|
||||
realNvr := rpmObj.String()
|
||||
if rpmObj.SourceRPM() == "" && rpmObj.Architecture() == "i686" {
|
||||
realNvr = strings.ReplaceAll(realNvr, ".i686", ".src")
|
||||
}
|
||||
if nvr == "" {
|
||||
nvr = rpmObj.SourceRPM()
|
||||
}
|
||||
if nvr != rpmObj.SourceRPM() {
|
||||
return nil, fmt.Errorf("only include RPMs from one package")
|
||||
if nvr == "" && rpmObj.Architecture() == "i686" {
|
||||
nvr = realNvr
|
||||
}
|
||||
} else {
|
||||
if nvr != rpmObj.SourceRPM() && nvr != fmt.Sprintf("%s.rpm", realNvr) {
|
||||
return nil, fmt.Errorf("only include RPMs from one package")
|
||||
}
|
||||
}
|
||||
}
|
||||
if !rpmutils.NVR().MatchString(nvr) {
|
||||
@ -307,6 +469,14 @@ func (c *Controller) RpmImportActivity(ctx context.Context, req *peridotpb.RpmIm
|
||||
}
|
||||
}
|
||||
|
||||
if setTaskStatus {
|
||||
err = tx.SetTaskStatus(taskID, peridotpb.TaskStatus_TASK_STATUS_SUCCEEDED)
|
||||
if err != nil {
|
||||
err = status.Errorf(codes.Internal, "could not set task status: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
err = beginTx.Commit()
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "could not commit transaction: %v", err)
|
||||
|
@ -46,6 +46,7 @@ import (
|
||||
peridotpb "peridot.resf.org/peridot/pb"
|
||||
"peridot.resf.org/peridot/plugin"
|
||||
"peridot.resf.org/peridot/rpmbuild"
|
||||
"peridot.resf.org/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -199,7 +200,7 @@ func (c *Controller) commonCreateTask(task *models.Task, taskResponse proto.Mess
|
||||
c.log.Errorf("could not set task status: %v", err)
|
||||
}
|
||||
|
||||
taskDb, err := c.db.GetTask(task.ID.String(), task.ProjectId.String)
|
||||
taskDb, err := c.db.GetTask(task.ID.String(), utils.NullStringToPointer(task.ProjectId))
|
||||
if err != nil {
|
||||
c.log.Errorf("could not get task: %v", err)
|
||||
return
|
||||
|
33
peridot/cmd/v1/peridot/BUILD.bazel
Normal file
33
peridot/cmd/v1/peridot/BUILD.bazel
Normal file
@ -0,0 +1,33 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "peridot_lib",
|
||||
srcs = [
|
||||
"build.go",
|
||||
"build_rpm_import.go",
|
||||
"lookaside.go",
|
||||
"lookaside_upload.go",
|
||||
"main.go",
|
||||
"utils.go",
|
||||
],
|
||||
data = [
|
||||
"//peridot/proto/v1:client_go",
|
||||
],
|
||||
importpath = "peridot.resf.org/peridot/cmd/v1/peridot",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"//utils",
|
||||
"//vendor/github.com/sirupsen/logrus",
|
||||
"//vendor/github.com/spf13/cobra",
|
||||
"//vendor/github.com/spf13/viper",
|
||||
"//vendor/golang.org/x/oauth2",
|
||||
"//vendor/golang.org/x/oauth2/clientcredentials",
|
||||
"//vendor/openapi.peridot.resf.org/peridotopenapi",
|
||||
],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "peridot",
|
||||
embed = [":peridot_lib"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
37
peridot/cmd/v1/peridot/build.go
Normal file
37
peridot/cmd/v1/peridot/build.go
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package main
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
var build = &cobra.Command{
|
||||
Use: "build",
|
||||
}
|
159
peridot/cmd/v1/peridot/build_rpm_import.go
Normal file
159
peridot/cmd/v1/peridot/build_rpm_import.go
Normal file
@ -0,0 +1,159 @@
|
||||
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/spf13/cobra"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"openapi.peridot.resf.org/peridotopenapi"
|
||||
"os"
|
||||
"peridot.resf.org/utils"
|
||||
"time"
|
||||
)
|
||||
|
||||
type LookasideUploadTask struct {
|
||||
Task struct {
|
||||
Subtasks []struct {
|
||||
Response struct {
|
||||
Digest string `json:"digest"`
|
||||
} `json:"response"`
|
||||
} `json:"subtasks"`
|
||||
} `json:"task"`
|
||||
}
|
||||
|
||||
var buildRpmImport = &cobra.Command{
|
||||
Use: "rpm-import [*.rpm]",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Run: buildRpmImportMn,
|
||||
}
|
||||
|
||||
var buildRpmImportForceOverride bool
|
||||
|
||||
func init() {
|
||||
buildRpmImport.Flags().BoolVar(&buildRpmImportForceOverride, "force-override", true, "Force override even if version exists (default: true)")
|
||||
}
|
||||
|
||||
func isFile(path string) bool {
|
||||
if _, err := os.Stat(path); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func buildRpmImportMn(_ *cobra.Command, args []string) {
|
||||
// Ensure project id exists
|
||||
projectId := mustGetProjectID()
|
||||
_ = projectId
|
||||
|
||||
// Ensure all args are valid files
|
||||
for _, arg := range args {
|
||||
if !isFile(arg) {
|
||||
log.Fatalf("%s is not a valid file", arg)
|
||||
}
|
||||
}
|
||||
|
||||
// Upload blobs to lookaside and wait for operation to finish
|
||||
var operations []string
|
||||
projectCl := getClient(serviceProject).(peridotopenapi.ProjectServiceApi)
|
||||
for _, arg := range args {
|
||||
bts, err := ioutil.ReadFile(arg)
|
||||
errFatal(err)
|
||||
base64EncodedBytes := base64.StdEncoding.EncodeToString(bts)
|
||||
|
||||
res, _, err := projectCl.LookasideFileUpload(getContext()).Body(peridotopenapi.V1LookasideFileUploadRequest{
|
||||
File: &base64EncodedBytes,
|
||||
}).Execute()
|
||||
errFatal(err)
|
||||
log.Printf("Uploading %s to lookaside with task id %s\n", arg, res.GetTaskId())
|
||||
operations = append(operations, res.GetTaskId())
|
||||
}
|
||||
|
||||
log.Println("Waiting for upload tasks to finish...")
|
||||
|
||||
// Wait for tasks to reach success state
|
||||
taskCl := getClient(serviceTask).(peridotopenapi.TaskServiceApi)
|
||||
var doneOperations []string
|
||||
var blobs []string
|
||||
for {
|
||||
didBreak := false
|
||||
for _, op := range operations {
|
||||
log.Printf("Waiting for %s to finish\n", op)
|
||||
if len(doneOperations) == len(operations) {
|
||||
didBreak = true
|
||||
break
|
||||
}
|
||||
if utils.StrContains(op, doneOperations) {
|
||||
continue
|
||||
}
|
||||
|
||||
res, resp, err := taskCl.GetTask(getContext(), "global", op).Execute()
|
||||
errFatal(err)
|
||||
task := res.GetTask()
|
||||
if task.GetDone() {
|
||||
subtask := task.GetSubtasks()[0]
|
||||
if subtask.GetStatus() == peridotopenapi.SUCCEEDED {
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
errFatal(err)
|
||||
|
||||
var subtaskFull LookasideUploadTask
|
||||
errFatal(json.Unmarshal(b, &subtaskFull))
|
||||
|
||||
blobs = append(blobs, subtaskFull.Task.Subtasks[0].Response.Digest)
|
||||
doneOperations = append(doneOperations, op)
|
||||
log.Printf("Task %s finished successfully\n", op)
|
||||
} else if subtask.GetStatus() != peridotopenapi.RUNNING || subtask.GetStatus() != peridotopenapi.PENDING {
|
||||
errFatal(fmt.Errorf("subtask %s failed with status %s", op, subtask.GetStatus()))
|
||||
}
|
||||
}
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
if didBreak {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
log.Println("Upload tasks finished")
|
||||
log.Println("Triggering RPM batch import")
|
||||
|
||||
cl := getClient(serviceBuild).(peridotopenapi.BuildServiceApi)
|
||||
_, _, err := cl.RpmLookasideBatchImport(getContext(), projectId).
|
||||
Body(peridotopenapi.InlineObject4{
|
||||
LookasideBlobs: &blobs,
|
||||
ForceOverride: &buildRpmImportForceOverride,
|
||||
}).Execute()
|
||||
errFatal(err)
|
||||
}
|
37
peridot/cmd/v1/peridot/lookaside.go
Normal file
37
peridot/cmd/v1/peridot/lookaside.go
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package main
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
|
||||
var lookaside = &cobra.Command{
|
||||
Use: "lookaside",
|
||||
}
|
65
peridot/cmd/v1/peridot/lookaside_upload.go
Normal file
65
peridot/cmd/v1/peridot/lookaside_upload.go
Normal file
@ -0,0 +1,65 @@
|
||||
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"github.com/spf13/cobra"
|
||||
"io/ioutil"
|
||||
"openapi.peridot.resf.org/peridotopenapi"
|
||||
"os"
|
||||
)
|
||||
|
||||
var lookasideUpload = &cobra.Command{
|
||||
Use: "upload [file]",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: lookasideUploadMn,
|
||||
}
|
||||
|
||||
func lookasideUploadMn(_ *cobra.Command, args []string) {
|
||||
filePath := args[0]
|
||||
stat, err := os.Stat(filePath)
|
||||
errFatal(err)
|
||||
if stat.IsDir() {
|
||||
errFatal(fmt.Errorf("%s is a directory", filePath))
|
||||
}
|
||||
|
||||
bts, err := ioutil.ReadFile(filePath)
|
||||
errFatal(err)
|
||||
base64EncodedBytes := base64.StdEncoding.EncodeToString(bts)
|
||||
|
||||
cl := getClient(serviceProject).(peridotopenapi.ProjectServiceApi)
|
||||
_, _, err = cl.LookasideFileUpload(getContext()).Body(peridotopenapi.V1LookasideFileUploadRequest{
|
||||
File: &base64EncodedBytes,
|
||||
}).Execute()
|
||||
errFatal(err)
|
||||
}
|
106
peridot/cmd/v1/peridot/main.go
Normal file
106
peridot/cmd/v1/peridot/main.go
Normal file
@ -0,0 +1,106 @@
|
||||
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var root = &cobra.Command{
|
||||
Use: "peridot",
|
||||
}
|
||||
|
||||
func init() {
|
||||
root.PersistentFlags().String("endpoint", "peridot-api.build.resf.org", "Peridot API endpoint")
|
||||
root.PersistentFlags().String("hdr-endpoint", "hdr.build.resf.org", "RESF OIDC endpoint")
|
||||
root.PersistentFlags().Bool("skip-ca-verify", false, "Whether to accept self-signed certificates")
|
||||
root.PersistentFlags().String("client-id", "", "Client ID for authentication")
|
||||
root.PersistentFlags().String("client-secret", "", "Client secret for authentication")
|
||||
root.PersistentFlags().String("project-id", "", "Peridot project ID")
|
||||
root.PersistentFlags().Bool("debug", false, "Debug mode")
|
||||
|
||||
root.AddCommand(lookaside)
|
||||
lookaside.AddCommand(lookasideUpload)
|
||||
|
||||
root.AddCommand(build)
|
||||
build.AddCommand(buildRpmImport)
|
||||
|
||||
viper.SetEnvPrefix("PERIDOT")
|
||||
viper.AutomaticEnv()
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))
|
||||
|
||||
err := viper.BindPFlags(root.PersistentFlags())
|
||||
if err != nil {
|
||||
log.Fatalf("could not bind pflags to viper - %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
if err := root.Execute(); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func endpoint() string {
|
||||
return viper.GetString("endpoint")
|
||||
}
|
||||
|
||||
func hdrEndpoint() string {
|
||||
return viper.GetString("hdr-endpoint")
|
||||
}
|
||||
|
||||
func skipCaVerify() bool {
|
||||
return viper.GetBool("skip-ca-verify")
|
||||
}
|
||||
|
||||
func getClientId() string {
|
||||
return viper.GetString("client-id")
|
||||
}
|
||||
|
||||
func getClientSecret() string {
|
||||
return viper.GetString("client-secret")
|
||||
}
|
||||
|
||||
func mustGetProjectID() string {
|
||||
ret := viper.GetString("project-id")
|
||||
if ret == "" {
|
||||
logrus.Fatal("project-id is required")
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func debug() bool {
|
||||
return viper.GetBool("debug")
|
||||
}
|
126
peridot/cmd/v1/peridot/utils.go
Normal file
126
peridot/cmd/v1/peridot/utils.go
Normal file
@ -0,0 +1,126 @@
|
||||
// Copyright (c) All respective contributors to the Peridot Project. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Rocky Enterprise Software Foundation, Inc. All rights reserved.
|
||||
// Copyright (c) 2021-2022 Ctrl IQ, Inc. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software without
|
||||
// specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/clientcredentials"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"openapi.peridot.resf.org/peridotopenapi"
|
||||
)
|
||||
|
||||
type service string
|
||||
|
||||
const (
|
||||
serviceProject = service("project")
|
||||
serviceImport = service("import")
|
||||
servicePackage = service("package")
|
||||
serviceBuild = service("build")
|
||||
serviceTask = service("task")
|
||||
)
|
||||
|
||||
var (
|
||||
doNotUseDirectlyClient map[service]interface{}
|
||||
doNotUseDirectlyCtx context.Context
|
||||
)
|
||||
|
||||
func getClient(svc service) interface{} {
|
||||
if doNotUseDirectlyClient != nil {
|
||||
return doNotUseDirectlyClient[svc]
|
||||
}
|
||||
doNotUseDirectlyClient = make(map[service]interface{})
|
||||
|
||||
tlsConfig := &tls.Config{
|
||||
// We should allow users to configure this.
|
||||
InsecureSkipVerify: skipCaVerify(), //nolint:gosec
|
||||
}
|
||||
|
||||
apiCfg := &peridotopenapi.Configuration{
|
||||
Debug: debug(),
|
||||
Host: endpoint(),
|
||||
Scheme: "https",
|
||||
UserAgent: "peridot/0.1",
|
||||
HTTPClient: &http.Client{
|
||||
Transport: &http.Transport{
|
||||
TLSClientConfig: tlsConfig,
|
||||
},
|
||||
},
|
||||
DefaultHeader: map[string]string{},
|
||||
Servers: peridotopenapi.ServerConfigurations{
|
||||
{
|
||||
URL: "https://" + endpoint(),
|
||||
},
|
||||
},
|
||||
OperationServers: map[string]peridotopenapi.ServerConfigurations{},
|
||||
}
|
||||
|
||||
apiClient := peridotopenapi.NewAPIClient(apiCfg)
|
||||
|
||||
doNotUseDirectlyClient[serviceProject] = apiClient.ProjectServiceApi
|
||||
doNotUseDirectlyClient[serviceImport] = apiClient.ImportServiceApi
|
||||
doNotUseDirectlyClient[servicePackage] = apiClient.PackageServiceApi
|
||||
doNotUseDirectlyClient[serviceBuild] = apiClient.BuildServiceApi
|
||||
doNotUseDirectlyClient[serviceTask] = apiClient.TaskServiceApi
|
||||
|
||||
return doNotUseDirectlyClient[svc]
|
||||
}
|
||||
|
||||
func getContext() context.Context {
|
||||
if doNotUseDirectlyCtx == nil {
|
||||
doNotUseDirectlyCtx = context.TODO()
|
||||
|
||||
oauth2Config := &clientcredentials.Config{
|
||||
ClientID: getClientId(),
|
||||
ClientSecret: getClientSecret(),
|
||||
// We don't currently support scopes, but authorize based on SpiceDB.
|
||||
// Lack of scopes does not indicate that client has full access, but
|
||||
// that we're managing access server sides and scopes doesn't affect that.
|
||||
Scopes: []string{},
|
||||
TokenURL: fmt.Sprintf("https://%s/oauth2/token", hdrEndpoint()),
|
||||
AuthStyle: oauth2.AuthStyleInHeader,
|
||||
}
|
||||
|
||||
tokenSource := oauth2Config.TokenSource(doNotUseDirectlyCtx)
|
||||
doNotUseDirectlyCtx = context.WithValue(doNotUseDirectlyCtx, peridotopenapi.ContextOAuth2, tokenSource)
|
||||
}
|
||||
return doNotUseDirectlyCtx
|
||||
}
|
||||
|
||||
func errFatal(err error) {
|
||||
if err != nil {
|
||||
log.Fatalf("an error occurred: %s", err.Error())
|
||||
}
|
||||
}
|
@ -107,14 +107,16 @@ func mn(_ *cobra.Command, _ []string) {
|
||||
db := serverconnector.MustAuto()
|
||||
|
||||
var initiatedPlugins []plugin.Plugin
|
||||
plugins, err := db.GetPluginsForProject(projectId)
|
||||
if err != nil {
|
||||
logrus.Fatalf("could not get plugins: %v", err)
|
||||
}
|
||||
if plugins != nil {
|
||||
initiatedPlugins, err = initiatePlugins(plugins)
|
||||
if projectId != "" {
|
||||
plugins, err := db.GetPluginsForProject(projectId)
|
||||
if err != nil {
|
||||
logrus.Fatalf("could not initiate plugins: %v", err)
|
||||
logrus.Fatalf("could not get plugins: %v", err)
|
||||
}
|
||||
if plugins != nil {
|
||||
initiatedPlugins, err = initiatePlugins(plugins)
|
||||
if err != nil {
|
||||
logrus.Fatalf("could not initiate plugins: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,6 +158,9 @@ func mn(_ *cobra.Command, _ []string) {
|
||||
// RPM Import
|
||||
w.Worker.RegisterActivity(w.WorkflowController.RpmImportActivity)
|
||||
|
||||
// Lookaside
|
||||
w.Worker.RegisterActivity(w.WorkflowController.LookasideFileUploadActivity)
|
||||
|
||||
// Yumrepofs
|
||||
w.Worker.RegisterActivity(w.WorkflowController.CreateHashedRepositoriesActivity)
|
||||
|
||||
|
@ -104,7 +104,9 @@ func mn(_ *cobra.Command, _ []string) {
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.TriggerImportFromBatchWorkflow)
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.SyncCatalogWorkflow)
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.RpmImportWorkflow)
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.RpmLookasideBatchImportWorkflow)
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.CreateHashedRepositoriesWorkflow)
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.LookasideFileUploadWorkflow)
|
||||
}
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.ProvisionWorkerWorkflow)
|
||||
w.Worker.RegisterWorkflow(w.WorkflowController.DestroyWorkerWorkflow)
|
||||
|
@ -104,7 +104,7 @@ type Access interface {
|
||||
// ListTasks returns only parent tasks
|
||||
ListTasks(projectId *string, page int32, limit int32) (models.Tasks, error)
|
||||
// GetTask returns a parent task as well as all it's child tasks
|
||||
GetTask(id string, projectId string) (models.Tasks, error)
|
||||
GetTask(id string, projectId *string) (models.Tasks, error)
|
||||
// GetTaskByBuildId returns the task of a build (only parent task)
|
||||
GetTaskByBuildId(buildId string) (*models.Task, error)
|
||||
AttachTaskToBuild(buildId string, taskId string) error
|
||||
|
@ -122,7 +122,7 @@ func (a *Access) SetTaskMetadata(id string, metadata *anypb.Any) error {
|
||||
return err
|
||||
}
|
||||
|
||||
func (a *Access) GetTask(id string, projectId string) (ret models.Tasks, err error) {
|
||||
func (a *Access) GetTask(id string, projectId *string) (ret models.Tasks, err error) {
|
||||
err = a.query.Select(
|
||||
&ret,
|
||||
`
|
||||
@ -130,7 +130,7 @@ func (a *Access) GetTask(id string, projectId string) (ret models.Tasks, err err
|
||||
select * from tasks
|
||||
where
|
||||
id = $1
|
||||
and project_id = $2
|
||||
and ($2 :: uuid is null or project_id = $2 :: uuid)
|
||||
union all
|
||||
select t.* from tasks t
|
||||
join task_query tq on tq.id = t.parent_task_id
|
||||
|
@ -30,6 +30,7 @@ go_library(
|
||||
"@go_googleapis//google/api:httpbody_go_proto",
|
||||
"@org_golang_google_grpc//:go_default_library",
|
||||
"@org_golang_google_grpc//codes",
|
||||
"@org_golang_google_grpc//credentials/insecure",
|
||||
"@org_golang_google_grpc//status",
|
||||
"@org_golang_google_protobuf//encoding/protojson:go_default_library",
|
||||
"@org_golang_google_protobuf//types/known/anypb:go_default_library",
|
||||
|
@ -567,3 +567,77 @@ func (s *Server) RpmImport(ctx context.Context, req *peridotpb.RpmImportRequest)
|
||||
Done: false,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *Server) RpmLookasideBatchImport(ctx context.Context, req *peridotpb.RpmLookasideBatchImportRequest) (*peridotpb.AsyncTask, error) {
|
||||
if err := req.ValidateAll(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := s.checkPermission(ctx, ObjectProject, req.ProjectId, PermissionBuild); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
user, err := utils.UserFromContext(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
projects, err := s.db.ListProjects(&peridotpb.ProjectFilters{
|
||||
Id: wrapperspb.String(req.ProjectId),
|
||||
})
|
||||
if err != nil {
|
||||
s.log.Errorf("could not list projects in RpmLookasideBatchImport: %v", err)
|
||||
return nil, utils.InternalError
|
||||
}
|
||||
if len(projects) != 1 {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "project %s does not exist", req.ProjectId)
|
||||
}
|
||||
|
||||
rollback := true
|
||||
beginTx, err := s.db.Begin()
|
||||
if err != nil {
|
||||
s.log.Error(err)
|
||||
return nil, utils.InternalError
|
||||
}
|
||||
defer func() {
|
||||
if rollback {
|
||||
_ = beginTx.Rollback()
|
||||
}
|
||||
}()
|
||||
tx := s.db.UseTransaction(beginTx)
|
||||
|
||||
task, err := tx.CreateTask(user, "noarch", peridotpb.TaskType_TASK_TYPE_RPM_LOOKASIDE_BATCH_IMPORT, &req.ProjectId, nil)
|
||||
if err != nil {
|
||||
s.log.Errorf("could not create build task in RpmImport: %v", err)
|
||||
return nil, status.Error(codes.InvalidArgument, "could not create rpm import task")
|
||||
}
|
||||
|
||||
taskProto, err := task.ToProto(true)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "could not marshal task: %v", err)
|
||||
}
|
||||
|
||||
rollback = false
|
||||
err = beginTx.Commit()
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, "could not save, try again")
|
||||
}
|
||||
|
||||
_, err = s.temporal.ExecuteWorkflow(
|
||||
context.Background(),
|
||||
client.StartWorkflowOptions{
|
||||
TaskQueue: MainTaskQueue,
|
||||
},
|
||||
s.temporalWorker.WorkflowController.RpmLookasideBatchImportWorkflow,
|
||||
req,
|
||||
task,
|
||||
)
|
||||
if err != nil {
|
||||
s.log.Errorf("could not start rpm lookaside batch import workflow in RpmImport: %v", err)
|
||||
return nil, status.Error(codes.Internal, "could not start rpm lookaside batch import workflow")
|
||||
}
|
||||
|
||||
return &peridotpb.AsyncTask{
|
||||
TaskId: task.ID.String(),
|
||||
Subtasks: []*peridotpb.Subtask{taskProto},
|
||||
Done: false,
|
||||
}, nil
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ func (s *Server) ListProjects(ctx context.Context, req *peridotpb.ListProjectsRe
|
||||
}
|
||||
|
||||
projects, err := s.db.ListProjects(&peridotpb.ProjectFilters{
|
||||
Ids: resources,
|
||||
Ids: utils.Take[string](resources, "global"),
|
||||
})
|
||||
if err != nil {
|
||||
s.log.Errorf("could not list projects: %v", err)
|
||||
@ -403,3 +403,69 @@ func (s *Server) CreateHashedRepositories(ctx context.Context, req *peridotpb.Cr
|
||||
Done: false,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *Server) LookasideFileUpload(ctx context.Context, req *peridotpb.LookasideFileUploadRequest) (*peridotpb.AsyncTask, error) {
|
||||
if err := req.Validate(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := s.checkPermission(ctx, ObjectGlobal, ObjectIdPeridot, PermissionManage); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
user, err := utils.UserFromContext(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rollback := true
|
||||
beginTx, err := s.db.Begin()
|
||||
if err != nil {
|
||||
s.log.Error(err)
|
||||
return nil, utils.InternalError
|
||||
}
|
||||
defer func() {
|
||||
if rollback {
|
||||
_ = beginTx.Rollback()
|
||||
}
|
||||
}()
|
||||
tx := s.db.UseTransaction(beginTx)
|
||||
|
||||
task, err := tx.CreateTask(user, "noarch", peridotpb.TaskType_TASK_TYPE_LOOKASIDE_FILE_UPLOAD, nil, nil)
|
||||
if err != nil {
|
||||
s.log.Errorf("could not create task: %v", err)
|
||||
return nil, utils.InternalError
|
||||
}
|
||||
|
||||
taskProto, err := task.ToProto(false)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "could not marshal task: %v", err)
|
||||
}
|
||||
|
||||
rollback = false
|
||||
err = beginTx.Commit()
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, "could not save, try again")
|
||||
}
|
||||
|
||||
_, err = s.temporal.ExecuteWorkflow(
|
||||
context.Background(),
|
||||
client.StartWorkflowOptions{
|
||||
ID: task.ID.String(),
|
||||
TaskQueue: MainTaskQueue,
|
||||
},
|
||||
s.temporalWorker.WorkflowController.LookasideFileUploadWorkflow,
|
||||
req,
|
||||
task,
|
||||
)
|
||||
if err != nil {
|
||||
s.log.Errorf("could not start workflow: %v", err)
|
||||
_ = s.db.SetTaskStatus(task.ID.String(), peridotpb.TaskStatus_TASK_STATUS_FAILED)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &peridotpb.AsyncTask{
|
||||
TaskId: task.ID.String(),
|
||||
Subtasks: []*peridotpb.Subtask{taskProto},
|
||||
Done: false,
|
||||
}, nil
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ import (
|
||||
"go.temporal.io/sdk/client"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/status"
|
||||
"io"
|
||||
"net/url"
|
||||
@ -87,6 +88,7 @@ type Server struct {
|
||||
temporalWorker *builderv1.Worker
|
||||
authz *authzed.Client
|
||||
hydra *hydraclient.OryHydra
|
||||
hydraAdmin *hydraclient.OryHydra
|
||||
}
|
||||
|
||||
func NewServer(db peridotdb.Access, c client.Client) (*Server, error) {
|
||||
@ -104,13 +106,22 @@ func NewServer(db peridotdb.Access, c client.Client) (*Server, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse hydra public url, error: %s", err)
|
||||
}
|
||||
|
||||
hydraSDK := hydraclient.NewHTTPClientWithConfig(nil, &hydraclient.TransportConfig{
|
||||
Schemes: []string{publicURL.Scheme},
|
||||
Host: publicURL.Host,
|
||||
BasePath: publicURL.Path,
|
||||
})
|
||||
|
||||
adminURL, err := url.Parse(servicecatalog.HydraAdmin())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not parse hydra admin url, error: %s", err)
|
||||
}
|
||||
hydraAdminSDK := hydraclient.NewHTTPClientWithConfig(nil, &hydraclient.TransportConfig{
|
||||
Schemes: []string{adminURL.Scheme},
|
||||
Host: adminURL.Host,
|
||||
BasePath: adminURL.Path,
|
||||
})
|
||||
|
||||
return &Server{
|
||||
log: logrus.New(),
|
||||
db: db,
|
||||
@ -118,19 +129,20 @@ func NewServer(db peridotdb.Access, c client.Client) (*Server, error) {
|
||||
temporalWorker: temporalWorker,
|
||||
authz: authz,
|
||||
hydra: hydraSDK,
|
||||
hydraAdmin: hydraAdminSDK,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *Server) interceptor(ctx context.Context, req interface{}, usi *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
n := utils.EndInterceptor
|
||||
n = utils.AuthInterceptor(s.hydra, []string{}, false, n)
|
||||
n = utils.AuthInterceptor(s.hydra, s.hydraAdmin, []string{}, false, n)
|
||||
|
||||
return n(ctx, req, usi, handler)
|
||||
}
|
||||
|
||||
func (s *Server) serverInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
|
||||
n := utils.ServerEndInterceptor
|
||||
n = utils.ServerAuthInterceptor(s.hydra, []string{}, false, n)
|
||||
n = utils.ServerAuthInterceptor(s.hydra, s.hydraAdmin, []string{}, false, n)
|
||||
|
||||
return n(srv, ss, info, handler)
|
||||
}
|
||||
@ -138,6 +150,10 @@ func (s *Server) serverInterceptor(srv interface{}, ss grpc.ServerStream, info *
|
||||
func (s *Server) Run() {
|
||||
res := utils.NewGRPCServer(
|
||||
&utils.GRPCOptions{
|
||||
DialOptions: []grpc.DialOption{
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(1024 * 1024 * 1024)),
|
||||
},
|
||||
ServerOptions: []grpc.ServerOption{
|
||||
grpc.UnaryInterceptor(s.interceptor),
|
||||
grpc.StreamInterceptor(s.serverInterceptor),
|
||||
|
@ -51,9 +51,14 @@ func (s *Server) ListTasks(ctx context.Context, req *peridotpb.ListTasksRequest)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var projectId *string
|
||||
if req.ProjectId.Value != "global" {
|
||||
projectId = &req.ProjectId.Value
|
||||
}
|
||||
|
||||
page := utils.MinPage(req.Page)
|
||||
limit := utils.MinLimit(req.Limit)
|
||||
tasks, err := s.db.ListTasks(&req.ProjectId.Value, page, limit)
|
||||
tasks, err := s.db.ListTasks(projectId, page, limit)
|
||||
if err != nil {
|
||||
s.log.Error(err)
|
||||
return nil, utils.InternalError
|
||||
@ -61,12 +66,6 @@ func (s *Server) ListTasks(ctx context.Context, req *peridotpb.ListTasksRequest)
|
||||
var total int64
|
||||
if len(tasks) > 0 {
|
||||
total = tasks[0].Total
|
||||
} else {
|
||||
total, err = s.db.ImportCountInProject(req.ProjectId.Value)
|
||||
if err != nil {
|
||||
s.log.Errorf("could not count imports: %v", err)
|
||||
return nil, utils.CouldNotRetrieveObjects
|
||||
}
|
||||
}
|
||||
|
||||
var asyncTasks []*peridotpb.AsyncTask
|
||||
@ -98,7 +97,12 @@ func (s *Server) GetTask(ctx context.Context, req *peridotpb.GetTaskRequest) (*p
|
||||
return nil, err
|
||||
}
|
||||
|
||||
tasks, err := s.db.GetTask(req.Id, req.ProjectId.Value)
|
||||
var projectId *string
|
||||
if req.ProjectId.Value != "global" {
|
||||
projectId = &req.ProjectId.Value
|
||||
}
|
||||
|
||||
tasks, err := s.db.GetTask(req.Id, projectId)
|
||||
if err != nil {
|
||||
s.log.Error(err)
|
||||
return nil, utils.InternalError
|
||||
@ -135,12 +139,16 @@ func (s *Server) StreamTaskLogs(req *peridotpb.StreamTaskLogsRequest, stream per
|
||||
|
||||
var taskId *string = nil
|
||||
var parentTaskId *string = nil
|
||||
var projectId *string
|
||||
if req.ProjectId != "global" {
|
||||
projectId = &req.ProjectId
|
||||
}
|
||||
if req.Parent {
|
||||
parentTaskId = &req.Id
|
||||
} else {
|
||||
taskId = &req.Id
|
||||
}
|
||||
_, err := s.db.GetTask(req.Id, req.ProjectId)
|
||||
_, err := s.db.GetTask(req.Id, projectId)
|
||||
if err != nil {
|
||||
s.log.Errorf("error getting task: %s", err)
|
||||
return utils.InternalError
|
||||
@ -173,7 +181,7 @@ func (s *Server) StreamTaskLogs(req *peridotpb.StreamTaskLogsRequest, stream per
|
||||
}
|
||||
}
|
||||
|
||||
task, err := s.db.GetTask(req.Id, req.ProjectId)
|
||||
task, err := s.db.GetTask(req.Id, projectId)
|
||||
if err != nil {
|
||||
s.log.Errorf("error getting task: %s", err)
|
||||
return utils.InternalError
|
||||
@ -189,11 +197,23 @@ func (s *Server) CancelTask(ctx context.Context, req *peridotpb.CancelTaskReques
|
||||
if err := req.ValidateAll(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := s.checkPermission(ctx, ObjectProject, req.ProjectId, PermissionBuild); err != nil {
|
||||
return nil, err
|
||||
|
||||
if req.ProjectId == "global" {
|
||||
if err := s.checkPermission(ctx, ObjectGlobal, ObjectIdPeridot, PermissionManage); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
if err := s.checkPermission(ctx, ObjectProject, req.ProjectId, PermissionBuild); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
tasks, err := s.db.GetTask(req.Id, req.ProjectId)
|
||||
var projectId *string
|
||||
if req.ProjectId != "global" {
|
||||
projectId = &req.ProjectId
|
||||
}
|
||||
|
||||
tasks, err := s.db.GetTask(req.Id, projectId)
|
||||
if err != nil {
|
||||
s.log.Error(err)
|
||||
return nil, utils.InternalError
|
||||
|
@ -0,0 +1 @@
|
||||
alter table tasks alter column project_id set not null;
|
@ -0,0 +1 @@
|
||||
alter table tasks alter column project_id drop not null;
|
@ -70,6 +70,18 @@ openapi_generator(
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
openapi_generator(
|
||||
name = "client_go",
|
||||
additional_properties = {
|
||||
"packageName": "peridotopenapi",
|
||||
"generateInterfaces": "true",
|
||||
"hideGenerationTimestamp": "true",
|
||||
},
|
||||
generator = "go",
|
||||
spec = ":openapi",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "pb",
|
||||
embed = [":peridotpb_go_proto"],
|
||||
|
@ -65,7 +65,7 @@ service BuildService {
|
||||
};
|
||||
}
|
||||
|
||||
// RpmImport imports rpm files into a project
|
||||
// RpmImport imports rpm files into a project (packaged into tar format)
|
||||
rpc RpmImport(RpmImportRequest) returns (AsyncTask) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/projects/{project_id=*}/builds/rpm-import"
|
||||
@ -76,6 +76,18 @@ service BuildService {
|
||||
metadata_type: "RpmImportOperationMetadata"
|
||||
};
|
||||
}
|
||||
|
||||
// RpmLookasideBatchImport imports rpm files into a project (stored in Lookaside)
|
||||
rpc RpmLookasideBatchImport(RpmLookasideBatchImportRequest) returns (AsyncTask) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/projects/{project_id=*}/builds/rpm-lookaside-batch-import"
|
||||
body: "*"
|
||||
};
|
||||
option (resf.peridot.v1.task_info) = {
|
||||
response_type: "RpmLookasideBatchImportTask"
|
||||
metadata_type: "RpmLookasideBatchImportOperationMetadata"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message Build {
|
||||
@ -342,3 +354,26 @@ message RpmImportTask {
|
||||
message RpmImportOperationMetadata {
|
||||
string package_name = 1;
|
||||
}
|
||||
|
||||
message RpmLookasideBatchImportRequest {
|
||||
string project_id = 1;
|
||||
|
||||
// Rpms
|
||||
//
|
||||
// Previously uploaded RPM tarball
|
||||
repeated string lookaside_blobs = 2;
|
||||
|
||||
// Force override
|
||||
//
|
||||
// Overwrite existing RPMs even if NVRA is locked
|
||||
// Useful for secure boot scenarios for example
|
||||
bool force_override = 3;
|
||||
}
|
||||
|
||||
message RpmLookasideBatchImportTask {
|
||||
resf.peridot.yumrepofs.v1.UpdateRepoTask repo_changes = 1;
|
||||
}
|
||||
|
||||
message RpmLookasideBatchImportOperationMetadata {
|
||||
repeated string package_names = 1;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ service PackageService {
|
||||
// for a specific package
|
||||
enum PackageType {
|
||||
// Unknown value. Should never be used
|
||||
PACKAGE_TYPE_UNSPECIFIED = 0;
|
||||
PACKAGE_TYPE_DEFAULT = 0;
|
||||
|
||||
// Normal packages from downstream dist-git
|
||||
// The repos are imported as-is
|
||||
|
@ -75,6 +75,13 @@ service ProjectService {
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc LookasideFileUpload(LookasideFileUploadRequest) returns (resf.peridot.v1.AsyncTask) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/lookaside"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Project is a contained RPM distribution
|
||||
@ -291,3 +298,10 @@ message CreateHashedRepositoriesRequest {
|
||||
message CreateHashedRepositoriesTask {
|
||||
repeated string repo_revisions = 1;
|
||||
}
|
||||
|
||||
message LookasideFileUploadRequest {
|
||||
string file = 1 [(validate.rules).string.min_bytes = 1];
|
||||
}
|
||||
message LookasideFileUploadTask {
|
||||
string digest = 1;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ service TaskService {
|
||||
}
|
||||
|
||||
enum TaskType {
|
||||
TASK_TYPE_UNSPECIFIED = 0;
|
||||
TASK_TYPE_UNKNOWN = 0;
|
||||
TASK_TYPE_IMPORT = 1;
|
||||
TASK_TYPE_IMPORT_SRC_GIT = 2;
|
||||
TASK_TYPE_IMPORT_SRC_GIT_TO_DIST_GIT = 3;
|
||||
@ -71,6 +71,8 @@ enum TaskType {
|
||||
TASK_TYPE_SYNC_CATALOG = 15;
|
||||
TASK_TYPE_RPM_IMPORT = 16;
|
||||
TASK_TYPE_CREATE_HASHED_REPOSITORIES = 17;
|
||||
TASK_TYPE_LOOKASIDE_FILE_UPLOAD = 18;
|
||||
TASK_TYPE_RPM_LOOKASIDE_BATCH_IMPORT = 19;
|
||||
}
|
||||
|
||||
enum TaskStatus {
|
||||
|
@ -71,7 +71,7 @@ func NewServer(db db.Access) *Server {
|
||||
|
||||
func (s *Server) interceptor(ctx context.Context, req interface{}, usi *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
n := utils.EndInterceptor
|
||||
n = utils.AuthInterceptor(s.hydra, []string{}, true, n)
|
||||
n = utils.AuthInterceptor(s.hydra, nil, []string{}, true, n)
|
||||
|
||||
return n(ctx, req, usi, handler)
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ go_library(
|
||||
"//vendor/github.com/jmoiron/sqlx",
|
||||
"//vendor/github.com/lib/pq",
|
||||
"//vendor/github.com/ory/hydra-client-go/client",
|
||||
"//vendor/github.com/ory/hydra-client-go/client/admin",
|
||||
"//vendor/github.com/ory/hydra-client-go/client/public",
|
||||
"//vendor/github.com/sirupsen/logrus",
|
||||
"//vendor/github.com/spf13/pflag",
|
||||
|
@ -32,10 +32,13 @@ package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/ory/hydra-client-go/client"
|
||||
"github.com/ory/hydra-client-go/client/admin"
|
||||
"github.com/ory/hydra-client-go/client/public"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/metadata"
|
||||
@ -69,7 +72,7 @@ func ServerEndInterceptor(srv interface{}, ss grpc.ServerStream, _ *grpc.StreamS
|
||||
return handler(srv, ss)
|
||||
}
|
||||
|
||||
func checkAuth(ctx context.Context, hydraSDK *client.OryHydra) (context.Context, error) {
|
||||
func checkAuth(ctx context.Context, hydraSDK *client.OryHydra, hydraAdmin *client.OryHydra) (context.Context, error) {
|
||||
// fetch metadata from grpc
|
||||
meta, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
@ -99,6 +102,22 @@ func checkAuth(ctx context.Context, hydraSDK *client.OryHydra) (context.Context,
|
||||
if err != nil {
|
||||
return ctx, err
|
||||
}
|
||||
if userInfo.Payload.Sub == "" && hydraAdmin != nil {
|
||||
introspect, err := hydraAdmin.Admin.IntrospectOAuth2Token(
|
||||
&admin.IntrospectOAuth2TokenParams{
|
||||
Context: ctx,
|
||||
Token: authToken[1],
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
logrus.Errorf("error introspecting token: %s", err)
|
||||
return ctx, status.Errorf(codes.Unauthenticated, "invalid authorization token")
|
||||
}
|
||||
|
||||
userInfo.Payload.Sub = introspect.Payload.ClientID
|
||||
userInfo.Payload.Name = introspect.Payload.Sub
|
||||
userInfo.Payload.Email = fmt.Sprintf("%s@%s", introspect.Payload.Sub, "serviceaccount.resf.org")
|
||||
}
|
||||
|
||||
// supply subject and token to further requests
|
||||
pairs := metadata.Pairs("x-user-id", userInfo.Payload.Sub, "x-user-name", userInfo.Payload.Name, "x-user-email", userInfo.Payload.Email, "x-auth-token", authToken[1])
|
||||
@ -108,12 +127,12 @@ func checkAuth(ctx context.Context, hydraSDK *client.OryHydra) (context.Context,
|
||||
}
|
||||
|
||||
// AuthInterceptor requires OAuth2 authentication for all routes except listed
|
||||
func AuthInterceptor(hydraSDK *client.OryHydra, excludedMethods []string, enforce bool, next InterceptorFunc) InterceptorFunc {
|
||||
func AuthInterceptor(hydraSDK *client.OryHydra, hydraAdminSDK *client.OryHydra, excludedMethods []string, enforce bool, next InterceptorFunc) InterceptorFunc {
|
||||
return func(ctx context.Context, req interface{}, usi *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
// skip authentication for excluded methods
|
||||
if !StrContains(usi.FullMethod, excludedMethods) {
|
||||
var err error
|
||||
if ctx, err = checkAuth(ctx, hydraSDK); err != nil {
|
||||
if ctx, err = checkAuth(ctx, hydraSDK, hydraAdminSDK); err != nil {
|
||||
if enforce {
|
||||
return nil, err
|
||||
}
|
||||
@ -132,7 +151,7 @@ type serverStream struct {
|
||||
func (ss *serverStream) Context() context.Context {
|
||||
return ss.ctx
|
||||
}
|
||||
func ServerAuthInterceptor(hydraSDK *client.OryHydra, excludedMethods []string, enforce bool, next ServerInterceptorFunc) ServerInterceptorFunc {
|
||||
func ServerAuthInterceptor(hydraSDK *client.OryHydra, hydraAdminSDK *client.OryHydra, excludedMethods []string, enforce bool, next ServerInterceptorFunc) ServerInterceptorFunc {
|
||||
return func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
|
||||
newStream := serverStream{
|
||||
ServerStream: ss,
|
||||
@ -142,7 +161,7 @@ func ServerAuthInterceptor(hydraSDK *client.OryHydra, excludedMethods []string,
|
||||
if !StrContains(info.FullMethod, excludedMethods) {
|
||||
var ctx context.Context
|
||||
var err error
|
||||
if ctx, err = checkAuth(ss.Context(), hydraSDK); err != nil {
|
||||
if ctx, err = checkAuth(ss.Context(), hydraSDK, hydraAdminSDK); err != nil {
|
||||
if enforce {
|
||||
return err
|
||||
}
|
||||
|
@ -102,6 +102,14 @@ func NullTimeToTimestamppb(t sql.NullTime) *timestamppb.Timestamp {
|
||||
return timestamppb.New(t.Time)
|
||||
}
|
||||
|
||||
func NullStringToPointer(s sql.NullString) *string {
|
||||
if !s.Valid {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &s.String
|
||||
}
|
||||
|
||||
func Int64(i int64) *int64 {
|
||||
return &i
|
||||
}
|
||||
@ -109,3 +117,7 @@ func Int64(i int64) *int64 {
|
||||
func Bool(b bool) *bool {
|
||||
return &b
|
||||
}
|
||||
|
||||
func Pointer[T any](t T) *T {
|
||||
return &t
|
||||
}
|
||||
|
@ -50,3 +50,14 @@ func IntersectString(a, b []string) []string {
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
func Take[T comparable](a []T, x T) []T {
|
||||
var n []T
|
||||
for _, v := range a {
|
||||
if v != x {
|
||||
n = append(n, v)
|
||||
}
|
||||
}
|
||||
|
||||
return n
|
||||
}
|
||||
|
13
vendor/golang.org/x/oauth2/clientcredentials/BUILD.bazel
generated
vendored
Normal file
13
vendor/golang.org/x/oauth2/clientcredentials/BUILD.bazel
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "clientcredentials",
|
||||
srcs = ["clientcredentials.go"],
|
||||
importmap = "peridot.resf.org/vendor/golang.org/x/oauth2/clientcredentials",
|
||||
importpath = "golang.org/x/oauth2/clientcredentials",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//vendor/golang.org/x/oauth2",
|
||||
"//vendor/golang.org/x/oauth2/internal",
|
||||
],
|
||||
)
|
120
vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go
generated
vendored
Normal file
120
vendor/golang.org/x/oauth2/clientcredentials/clientcredentials.go
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
// Copyright 2014 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package clientcredentials implements the OAuth2.0 "client credentials" token flow,
|
||||
// also known as the "two-legged OAuth 2.0".
|
||||
//
|
||||
// This should be used when the client is acting on its own behalf or when the client
|
||||
// is the resource owner. It may also be used when requesting access to protected
|
||||
// resources based on an authorization previously arranged with the authorization
|
||||
// server.
|
||||
//
|
||||
// See https://tools.ietf.org/html/rfc6749#section-4.4
|
||||
package clientcredentials // import "golang.org/x/oauth2/clientcredentials"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
"golang.org/x/oauth2/internal"
|
||||
)
|
||||
|
||||
// Config describes a 2-legged OAuth2 flow, with both the
|
||||
// client application information and the server's endpoint URLs.
|
||||
type Config struct {
|
||||
// ClientID is the application's ID.
|
||||
ClientID string
|
||||
|
||||
// ClientSecret is the application's secret.
|
||||
ClientSecret string
|
||||
|
||||
// TokenURL is the resource server's token endpoint
|
||||
// URL. This is a constant specific to each server.
|
||||
TokenURL string
|
||||
|
||||
// Scope specifies optional requested permissions.
|
||||
Scopes []string
|
||||
|
||||
// EndpointParams specifies additional parameters for requests to the token endpoint.
|
||||
EndpointParams url.Values
|
||||
|
||||
// AuthStyle optionally specifies how the endpoint wants the
|
||||
// client ID & client secret sent. The zero value means to
|
||||
// auto-detect.
|
||||
AuthStyle oauth2.AuthStyle
|
||||
}
|
||||
|
||||
// Token uses client credentials to retrieve a token.
|
||||
//
|
||||
// The provided context optionally controls which HTTP client is used. See the oauth2.HTTPClient variable.
|
||||
func (c *Config) Token(ctx context.Context) (*oauth2.Token, error) {
|
||||
return c.TokenSource(ctx).Token()
|
||||
}
|
||||
|
||||
// Client returns an HTTP client using the provided token.
|
||||
// The token will auto-refresh as necessary.
|
||||
//
|
||||
// The provided context optionally controls which HTTP client
|
||||
// is returned. See the oauth2.HTTPClient variable.
|
||||
//
|
||||
// The returned Client and its Transport should not be modified.
|
||||
func (c *Config) Client(ctx context.Context) *http.Client {
|
||||
return oauth2.NewClient(ctx, c.TokenSource(ctx))
|
||||
}
|
||||
|
||||
// TokenSource returns a TokenSource that returns t until t expires,
|
||||
// automatically refreshing it as necessary using the provided context and the
|
||||
// client ID and client secret.
|
||||
//
|
||||
// Most users will use Config.Client instead.
|
||||
func (c *Config) TokenSource(ctx context.Context) oauth2.TokenSource {
|
||||
source := &tokenSource{
|
||||
ctx: ctx,
|
||||
conf: c,
|
||||
}
|
||||
return oauth2.ReuseTokenSource(nil, source)
|
||||
}
|
||||
|
||||
type tokenSource struct {
|
||||
ctx context.Context
|
||||
conf *Config
|
||||
}
|
||||
|
||||
// Token refreshes the token by using a new client credentials request.
|
||||
// tokens received this way do not include a refresh token
|
||||
func (c *tokenSource) Token() (*oauth2.Token, error) {
|
||||
v := url.Values{
|
||||
"grant_type": {"client_credentials"},
|
||||
}
|
||||
if len(c.conf.Scopes) > 0 {
|
||||
v.Set("scope", strings.Join(c.conf.Scopes, " "))
|
||||
}
|
||||
for k, p := range c.conf.EndpointParams {
|
||||
// Allow grant_type to be overridden to allow interoperability with
|
||||
// non-compliant implementations.
|
||||
if _, ok := v[k]; ok && k != "grant_type" {
|
||||
return nil, fmt.Errorf("oauth2: cannot overwrite parameter %q", k)
|
||||
}
|
||||
v[k] = p
|
||||
}
|
||||
|
||||
tk, err := internal.RetrieveToken(c.ctx, c.conf.ClientID, c.conf.ClientSecret, c.conf.TokenURL, v, internal.AuthStyle(c.conf.AuthStyle))
|
||||
if err != nil {
|
||||
if rErr, ok := err.(*internal.RetrieveError); ok {
|
||||
return nil, (*oauth2.RetrieveError)(rErr)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
t := &oauth2.Token{
|
||||
AccessToken: tk.AccessToken,
|
||||
TokenType: tk.TokenType,
|
||||
RefreshToken: tk.RefreshToken,
|
||||
Expiry: tk.Expiry,
|
||||
}
|
||||
return t.WithExtra(tk.Raw), nil
|
||||
}
|
5
vendor/modules.txt
vendored
5
vendor/modules.txt
vendored
@ -588,6 +588,7 @@ golang.org/x/net/trace
|
||||
## explicit
|
||||
golang.org/x/oauth2
|
||||
golang.org/x/oauth2/authhandler
|
||||
golang.org/x/oauth2/clientcredentials
|
||||
golang.org/x/oauth2/google
|
||||
golang.org/x/oauth2/google/internal/externalaccount
|
||||
golang.org/x/oauth2/internal
|
||||
@ -981,6 +982,9 @@ k8s.io/client-go/util/workqueue
|
||||
k8s.io/klog/v2
|
||||
# k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9
|
||||
k8s.io/utils/integer
|
||||
# openapi.peridot.resf.org/peridotopenapi v0.0.0-00010101000000-000000000000 => ./bazel-bin/peridot/proto/v1/client_go
|
||||
## explicit
|
||||
openapi.peridot.resf.org/peridotopenapi
|
||||
# peridot.resf.org/common v0.0.0-00010101000000-000000000000 => ./bazel-bin/proto/commonpb_go_proto_/peridot.resf.org/common
|
||||
## explicit
|
||||
peridot.resf.org/common
|
||||
@ -1010,6 +1014,7 @@ sigs.k8s.io/structured-merge-diff/v4/value
|
||||
# sigs.k8s.io/yaml v1.2.0
|
||||
sigs.k8s.io/yaml
|
||||
# github.com/dgrijalva/jwt-go v3.2.0+incompatible => github.com/golang-jwt/jwt/v4 v4.4.2
|
||||
# openapi.peridot.resf.org/peridotopenapi => ./bazel-bin/peridot/proto/v1/client_go
|
||||
# bazel.build/protobuf => ./bazel-bin/build/bazel/protobuf/bazelbuild_go_proto_/bazel.build/protobuf
|
||||
# bazel.build/remote/execution/v2 => ./bazel-bin/build/bazel/remote/execution/v2/remoteexecution_go_proto_/bazel.build/remote/execution/v2
|
||||
# bazel.build/semver => ./bazel-bin/build/bazel/semver/semver_go_proto_/bazel.build/semver
|
||||
|
24
vendor/openapi.peridot.resf.org/peridotopenapi/.gitignore
generated
vendored
Normal file
24
vendor/openapi.peridot.resf.org/peridotopenapi/.gitignore
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
23
vendor/openapi.peridot.resf.org/peridotopenapi/.openapi-generator-ignore
generated
vendored
Normal file
23
vendor/openapi.peridot.resf.org/peridotopenapi/.openapi-generator-ignore
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
8
vendor/openapi.peridot.resf.org/peridotopenapi/.travis.yml
generated
vendored
Normal file
8
vendor/openapi.peridot.resf.org/peridotopenapi/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
language: go
|
||||
|
||||
install:
|
||||
- go get -d -v .
|
||||
|
||||
script:
|
||||
- go build -v ./
|
||||
|
82
vendor/openapi.peridot.resf.org/peridotopenapi/BUILD.bazel
generated
vendored
Normal file
82
vendor/openapi.peridot.resf.org/peridotopenapi/BUILD.bazel
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
|
||||
go_library(
|
||||
name = "peridotopenapi",
|
||||
srcs = [
|
||||
"api_build_service.go",
|
||||
"api_import_service.go",
|
||||
"api_package_service.go",
|
||||
"api_project_service.go",
|
||||
"api_search_service.go",
|
||||
"api_task_service.go",
|
||||
"client.go",
|
||||
"configuration.go",
|
||||
"model_api_http_body.go",
|
||||
"model_import_package_request_is_the_request_message_for_import_service_import_package.go",
|
||||
"model_inline_object.go",
|
||||
"model_inline_object_1.go",
|
||||
"model_inline_object_2.go",
|
||||
"model_inline_object_3.go",
|
||||
"model_inline_object_4.go",
|
||||
"model_inline_object_5.go",
|
||||
"model_inline_object_6.go",
|
||||
"model_inline_object_7.go",
|
||||
"model_inline_object_8.go",
|
||||
"model_protobuf_any.go",
|
||||
"model_rpc_status.go",
|
||||
"model_stream_result_of_api_http_body.go",
|
||||
"model_stream_result_of_v1_search_response.go",
|
||||
"model_v1_async_task.go",
|
||||
"model_v1_batch_filter.go",
|
||||
"model_v1_build.go",
|
||||
"model_v1_build_batch.go",
|
||||
"model_v1_build_filters.go",
|
||||
"model_v1_create_project_request.go",
|
||||
"model_v1_create_project_response.go",
|
||||
"model_v1_get_build_batch_response.go",
|
||||
"model_v1_get_build_response.go",
|
||||
"model_v1_get_import_batch_response.go",
|
||||
"model_v1_get_import_response.go",
|
||||
"model_v1_get_package_response.go",
|
||||
"model_v1_get_project_credentials_response.go",
|
||||
"model_v1_get_project_response.go",
|
||||
"model_v1_get_repository_response.go",
|
||||
"model_v1_get_task_response.go",
|
||||
"model_v1_import.go",
|
||||
"model_v1_import_batch.go",
|
||||
"model_v1_import_batch_retry_failed_response.go",
|
||||
"model_v1_import_package_batch_response.go",
|
||||
"model_v1_import_package_request.go",
|
||||
"model_v1_import_revision.go",
|
||||
"model_v1_list_build_batches_response.go",
|
||||
"model_v1_list_builds_response.go",
|
||||
"model_v1_list_import_batches_response.go",
|
||||
"model_v1_list_imports_response.go",
|
||||
"model_v1_list_packages_response.go",
|
||||
"model_v1_list_projects_response.go",
|
||||
"model_v1_list_repositories_response.go",
|
||||
"model_v1_list_tasks_response.go",
|
||||
"model_v1_lookaside_file_upload_request.go",
|
||||
"model_v1_package.go",
|
||||
"model_v1_package_filters.go",
|
||||
"model_v1_package_type.go",
|
||||
"model_v1_project.go",
|
||||
"model_v1_repository.go",
|
||||
"model_v1_search_request.go",
|
||||
"model_v1_search_response.go",
|
||||
"model_v1_set_project_credentials_response.go",
|
||||
"model_v1_submit_build_batch_response.go",
|
||||
"model_v1_submit_build_request.go",
|
||||
"model_v1_subtask.go",
|
||||
"model_v1_task_status.go",
|
||||
"model_v1_task_type.go",
|
||||
"model_v1_update_project_response.go",
|
||||
"model_v1_version_release.go",
|
||||
"response.go",
|
||||
"utils.go",
|
||||
],
|
||||
importmap = "peridot.resf.org/vendor/openapi.peridot.resf.org/peridotopenapi",
|
||||
importpath = "openapi.peridot.resf.org/peridotopenapi",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//vendor/golang.org/x/oauth2"],
|
||||
)
|
205
vendor/openapi.peridot.resf.org/peridotopenapi/README.md
generated
vendored
Normal file
205
vendor/openapi.peridot.resf.org/peridotopenapi/README.md
generated
vendored
Normal file
@ -0,0 +1,205 @@
|
||||
# Go API client for peridotopenapi
|
||||
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
|
||||
## Overview
|
||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
|
||||
|
||||
- API version: version not set
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.GoClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
Install the following dependencies:
|
||||
|
||||
```shell
|
||||
go get github.com/stretchr/testify/assert
|
||||
go get golang.org/x/oauth2
|
||||
go get golang.org/x/net/context
|
||||
```
|
||||
|
||||
Put the package under your project folder and add the following in import:
|
||||
|
||||
```golang
|
||||
import sw "./peridotopenapi"
|
||||
```
|
||||
|
||||
To use a proxy, set the environment variable `HTTP_PROXY`:
|
||||
|
||||
```golang
|
||||
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
|
||||
```
|
||||
|
||||
## Configuration of Server URL
|
||||
|
||||
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
|
||||
|
||||
### Select Server Configuration
|
||||
|
||||
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
|
||||
|
||||
```golang
|
||||
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
|
||||
```
|
||||
|
||||
### Templated Server URL
|
||||
|
||||
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
|
||||
|
||||
```golang
|
||||
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
|
||||
"basePath": "v2",
|
||||
})
|
||||
```
|
||||
|
||||
Note, enum values are always validated and all unused variables are silently ignored.
|
||||
|
||||
### URLs Configuration per Operation
|
||||
|
||||
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
|
||||
An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
|
||||
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
|
||||
|
||||
```
|
||||
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
|
||||
"{classname}Service.{nickname}": 2,
|
||||
})
|
||||
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
|
||||
"{classname}Service.{nickname}": {
|
||||
"port": "8443",
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*BuildServiceApi* | [**GetBuild**](docs/BuildServiceApi.md#getbuild) | **Get** /v1/projects/{projectId}/builds/{buildId} | GetBuild returns a build by its id
|
||||
*BuildServiceApi* | [**GetBuildBatch**](docs/BuildServiceApi.md#getbuildbatch) | **Get** /v1/projects/{projectId}/build_batches/{buildBatchId} | GetBuildBatch returns a build batch by its id
|
||||
*BuildServiceApi* | [**ListBuildBatches**](docs/BuildServiceApi.md#listbuildbatches) | **Get** /v1/projects/{projectId}/build_batches | ListBuildBatches returns all build batches
|
||||
*BuildServiceApi* | [**ListBuilds**](docs/BuildServiceApi.md#listbuilds) | **Get** /v1/projects/{projectId}/builds | ListBuilds returns all builds filtered through given filters
|
||||
*BuildServiceApi* | [**RpmImport**](docs/BuildServiceApi.md#rpmimport) | **Post** /v1/projects/{projectId}/builds/rpm-import | RpmImport imports rpm files into a project (packaged into tar format)
|
||||
*BuildServiceApi* | [**RpmLookasideBatchImport**](docs/BuildServiceApi.md#rpmlookasidebatchimport) | **Post** /v1/projects/{projectId}/builds/rpm-lookaside-batch-import | RpmLookasideBatchImport imports rpm files into a project (stored in Lookaside)
|
||||
*BuildServiceApi* | [**SubmitBuild**](docs/BuildServiceApi.md#submitbuild) | **Post** /v1/projects/{projectId}/builds | SubmitBuild builds a package scoped to a project The project has to contain an import for the specific package This method is asynchronous. Peridot uses the AsyncTask abstraction. Check out `//peridot/proto/v1:task.proto` for more information
|
||||
*BuildServiceApi* | [**SubmitBuildBatch**](docs/BuildServiceApi.md#submitbuildbatch) | **Post** /v1/projects/{projectId}/build_batches | SubmitBuildBatch submits a batch of builds.
|
||||
*ImportServiceApi* | [**GetImport**](docs/ImportServiceApi.md#getimport) | **Get** /v1/projects/{projectId}/imports/{importId} | GetImport gets an import by ID.
|
||||
*ImportServiceApi* | [**GetImportBatch**](docs/ImportServiceApi.md#getimportbatch) | **Get** /v1/projects/{projectId}/import_batches/{importBatchId} | GetImportBatch gets an import batch by ID.
|
||||
*ImportServiceApi* | [**ImportBatchRetryFailed**](docs/ImportServiceApi.md#importbatchretryfailed) | **Post** /v1/projects/{projectId}/import_batches/{importBatchId}/retry_failed | ImportBatchRetryFailed retries failed imports in a batch.
|
||||
*ImportServiceApi* | [**ImportPackage**](docs/ImportServiceApi.md#importpackage) | **Post** /v1/projects/{projectId}/imports | ImportPackage imports a package scoped to a project This method is asynchronous. Peridot uses the AsyncTask abstraction. Check out `//peridot/proto/v1:task.proto` for more information TODO low-pri: Support inter-project imports
|
||||
*ImportServiceApi* | [**ImportPackageBatch**](docs/ImportServiceApi.md#importpackagebatch) | **Post** /v1/projects/{projectId}/import_batches | ImportPackageBatch imports a batch of packages scoped to a project
|
||||
*ImportServiceApi* | [**ListImportBatches**](docs/ImportServiceApi.md#listimportbatches) | **Get** /v1/projects/{projectId}/import_batches | ListImportBatches lists all import batches for a project.
|
||||
*ImportServiceApi* | [**ListImports**](docs/ImportServiceApi.md#listimports) | **Get** /v1/projects/{projectId}/imports | ListImports lists all imports for a project.
|
||||
*PackageServiceApi* | [**GetPackage**](docs/PackageServiceApi.md#getpackage) | **Get** /v1/projects/{projectId}/packages/{field}/{value} | GetPackage returns a package by its id or name
|
||||
*PackageServiceApi* | [**ListPackages**](docs/PackageServiceApi.md#listpackages) | **Get** /v1/projects/{projectId}/packages | ListPackages returns all packages with filters applied
|
||||
*ProjectServiceApi* | [**CreateHashedRepositories**](docs/ProjectServiceApi.md#createhashedrepositories) | **Post** /v1/projects/{projectId}/repositories/hashed |
|
||||
*ProjectServiceApi* | [**CreateProject**](docs/ProjectServiceApi.md#createproject) | **Post** /v1/projects |
|
||||
*ProjectServiceApi* | [**GetProject**](docs/ProjectServiceApi.md#getproject) | **Get** /v1/projects/{id} |
|
||||
*ProjectServiceApi* | [**GetProjectCredentials**](docs/ProjectServiceApi.md#getprojectcredentials) | **Get** /v1/projects/{projectId}/credentials |
|
||||
*ProjectServiceApi* | [**GetRepository**](docs/ProjectServiceApi.md#getrepository) | **Get** /v1/projects/{projectId}/repositories/{id} |
|
||||
*ProjectServiceApi* | [**ListProjects**](docs/ProjectServiceApi.md#listprojects) | **Get** /v1/projects |
|
||||
*ProjectServiceApi* | [**ListRepositories**](docs/ProjectServiceApi.md#listrepositories) | **Get** /v1/projects/{projectId}/repositories |
|
||||
*ProjectServiceApi* | [**LookasideFileUpload**](docs/ProjectServiceApi.md#lookasidefileupload) | **Post** /v1/lookaside |
|
||||
*ProjectServiceApi* | [**SetProjectCredentials**](docs/ProjectServiceApi.md#setprojectcredentials) | **Post** /v1/projects/{projectId}/credentials |
|
||||
*ProjectServiceApi* | [**SyncCatalog**](docs/ProjectServiceApi.md#synccatalog) | **Post** /v1/projects/{projectId}/catalogsync |
|
||||
*ProjectServiceApi* | [**UpdateProject**](docs/ProjectServiceApi.md#updateproject) | **Put** /v1/projects/{projectId} |
|
||||
*SearchServiceApi* | [**Search**](docs/SearchServiceApi.md#search) | **Post** /v1/search |
|
||||
*TaskServiceApi* | [**CancelTask**](docs/TaskServiceApi.md#canceltask) | **Post** /v1/projects/{projectId}/tasks/{id}/cancel | CancelTask cancels a task with the given ID. Only parent tasks can be cancelled and if they're in the PENDING or RUNNING state.
|
||||
*TaskServiceApi* | [**GetTask**](docs/TaskServiceApi.md#gettask) | **Get** /v1/projects/{projectId}/tasks/{id} | GetTask returns a specific task with the given ID
|
||||
*TaskServiceApi* | [**ListTasks**](docs/TaskServiceApi.md#listtasks) | **Get** /v1/projects/{projectId}/tasks | ListTasks returns a list of tasks from all projects List mode won't return task responses. The reason being responses being able to reach huge sizes. To get the response for a specific task, you can use GetTask, either on the specific subtask or the parent task.
|
||||
*TaskServiceApi* | [**StreamTaskLogs**](docs/TaskServiceApi.md#streamtasklogs) | **Get** /v1/projects/{projectId}/tasks/{id}/logs | StreamTaskLogs streams the logs of a specific task with the given ID
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [ApiHttpBody](docs/ApiHttpBody.md)
|
||||
- [ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage](docs/ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage.md)
|
||||
- [InlineObject](docs/InlineObject.md)
|
||||
- [InlineObject1](docs/InlineObject1.md)
|
||||
- [InlineObject2](docs/InlineObject2.md)
|
||||
- [InlineObject3](docs/InlineObject3.md)
|
||||
- [InlineObject4](docs/InlineObject4.md)
|
||||
- [InlineObject5](docs/InlineObject5.md)
|
||||
- [InlineObject6](docs/InlineObject6.md)
|
||||
- [InlineObject7](docs/InlineObject7.md)
|
||||
- [InlineObject8](docs/InlineObject8.md)
|
||||
- [ProtobufAny](docs/ProtobufAny.md)
|
||||
- [RpcStatus](docs/RpcStatus.md)
|
||||
- [StreamResultOfApiHttpBody](docs/StreamResultOfApiHttpBody.md)
|
||||
- [StreamResultOfV1SearchResponse](docs/StreamResultOfV1SearchResponse.md)
|
||||
- [V1AsyncTask](docs/V1AsyncTask.md)
|
||||
- [V1BatchFilter](docs/V1BatchFilter.md)
|
||||
- [V1Build](docs/V1Build.md)
|
||||
- [V1BuildBatch](docs/V1BuildBatch.md)
|
||||
- [V1BuildFilters](docs/V1BuildFilters.md)
|
||||
- [V1CreateProjectRequest](docs/V1CreateProjectRequest.md)
|
||||
- [V1CreateProjectResponse](docs/V1CreateProjectResponse.md)
|
||||
- [V1GetBuildBatchResponse](docs/V1GetBuildBatchResponse.md)
|
||||
- [V1GetBuildResponse](docs/V1GetBuildResponse.md)
|
||||
- [V1GetImportBatchResponse](docs/V1GetImportBatchResponse.md)
|
||||
- [V1GetImportResponse](docs/V1GetImportResponse.md)
|
||||
- [V1GetPackageResponse](docs/V1GetPackageResponse.md)
|
||||
- [V1GetProjectCredentialsResponse](docs/V1GetProjectCredentialsResponse.md)
|
||||
- [V1GetProjectResponse](docs/V1GetProjectResponse.md)
|
||||
- [V1GetRepositoryResponse](docs/V1GetRepositoryResponse.md)
|
||||
- [V1GetTaskResponse](docs/V1GetTaskResponse.md)
|
||||
- [V1Import](docs/V1Import.md)
|
||||
- [V1ImportBatch](docs/V1ImportBatch.md)
|
||||
- [V1ImportBatchRetryFailedResponse](docs/V1ImportBatchRetryFailedResponse.md)
|
||||
- [V1ImportPackageBatchResponse](docs/V1ImportPackageBatchResponse.md)
|
||||
- [V1ImportPackageRequest](docs/V1ImportPackageRequest.md)
|
||||
- [V1ImportRevision](docs/V1ImportRevision.md)
|
||||
- [V1ListBuildBatchesResponse](docs/V1ListBuildBatchesResponse.md)
|
||||
- [V1ListBuildsResponse](docs/V1ListBuildsResponse.md)
|
||||
- [V1ListImportBatchesResponse](docs/V1ListImportBatchesResponse.md)
|
||||
- [V1ListImportsResponse](docs/V1ListImportsResponse.md)
|
||||
- [V1ListPackagesResponse](docs/V1ListPackagesResponse.md)
|
||||
- [V1ListProjectsResponse](docs/V1ListProjectsResponse.md)
|
||||
- [V1ListRepositoriesResponse](docs/V1ListRepositoriesResponse.md)
|
||||
- [V1ListTasksResponse](docs/V1ListTasksResponse.md)
|
||||
- [V1LookasideFileUploadRequest](docs/V1LookasideFileUploadRequest.md)
|
||||
- [V1Package](docs/V1Package.md)
|
||||
- [V1PackageFilters](docs/V1PackageFilters.md)
|
||||
- [V1PackageType](docs/V1PackageType.md)
|
||||
- [V1Project](docs/V1Project.md)
|
||||
- [V1Repository](docs/V1Repository.md)
|
||||
- [V1SearchRequest](docs/V1SearchRequest.md)
|
||||
- [V1SearchResponse](docs/V1SearchResponse.md)
|
||||
- [V1SetProjectCredentialsResponse](docs/V1SetProjectCredentialsResponse.md)
|
||||
- [V1SubmitBuildBatchResponse](docs/V1SubmitBuildBatchResponse.md)
|
||||
- [V1SubmitBuildRequest](docs/V1SubmitBuildRequest.md)
|
||||
- [V1Subtask](docs/V1Subtask.md)
|
||||
- [V1TaskStatus](docs/V1TaskStatus.md)
|
||||
- [V1TaskType](docs/V1TaskType.md)
|
||||
- [V1UpdateProjectResponse](docs/V1UpdateProjectResponse.md)
|
||||
- [V1VersionRelease](docs/V1VersionRelease.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
Endpoints do not require authorization.
|
||||
|
||||
|
||||
## Documentation for Utility Methods
|
||||
|
||||
Due to the fact that model structure members are all pointers, this package contains
|
||||
a number of utility functions to easily obtain pointers to values of basic types.
|
||||
Each of these functions takes a value of the given basic type and returns a pointer to it:
|
||||
|
||||
* `PtrBool`
|
||||
* `PtrInt`
|
||||
* `PtrInt32`
|
||||
* `PtrInt64`
|
||||
* `PtrFloat`
|
||||
* `PtrFloat32`
|
||||
* `PtrFloat64`
|
||||
* `PtrString`
|
||||
* `PtrTime`
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
1153
vendor/openapi.peridot.resf.org/peridotopenapi/api_build_service.go
generated
vendored
Normal file
1153
vendor/openapi.peridot.resf.org/peridotopenapi/api_build_service.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1004
vendor/openapi.peridot.resf.org/peridotopenapi/api_import_service.go
generated
vendored
Normal file
1004
vendor/openapi.peridot.resf.org/peridotopenapi/api_import_service.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
357
vendor/openapi.peridot.resf.org/peridotopenapi/api_package_service.go
generated
vendored
Normal file
357
vendor/openapi.peridot.resf.org/peridotopenapi/api_package_service.go
generated
vendored
Normal file
@ -0,0 +1,357 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
_context "context"
|
||||
_ioutil "io/ioutil"
|
||||
_nethttp "net/http"
|
||||
_neturl "net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
var (
|
||||
_ _context.Context
|
||||
)
|
||||
|
||||
type PackageServiceApi interface {
|
||||
|
||||
/*
|
||||
* GetPackage GetPackage returns a package by its id or name
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param field
|
||||
* @param value
|
||||
* @return ApiGetPackageRequest
|
||||
*/
|
||||
GetPackage(ctx _context.Context, projectId string, field string, value string) ApiGetPackageRequest
|
||||
|
||||
/*
|
||||
* GetPackageExecute executes the request
|
||||
* @return V1GetPackageResponse
|
||||
*/
|
||||
GetPackageExecute(r ApiGetPackageRequest) (V1GetPackageResponse, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* ListPackages ListPackages returns all packages with filters applied
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId Project ID that should be queried
|
||||
* @return ApiListPackagesRequest
|
||||
*/
|
||||
ListPackages(ctx _context.Context, projectId string) ApiListPackagesRequest
|
||||
|
||||
/*
|
||||
* ListPackagesExecute executes the request
|
||||
* @return V1ListPackagesResponse
|
||||
*/
|
||||
ListPackagesExecute(r ApiListPackagesRequest) (V1ListPackagesResponse, *_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// PackageServiceApiService PackageServiceApi service
|
||||
type PackageServiceApiService service
|
||||
|
||||
type ApiGetPackageRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService PackageServiceApi
|
||||
projectId string
|
||||
field string
|
||||
value string
|
||||
}
|
||||
|
||||
|
||||
func (r ApiGetPackageRequest) Execute() (V1GetPackageResponse, *_nethttp.Response, error) {
|
||||
return r.ApiService.GetPackageExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* GetPackage GetPackage returns a package by its id or name
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param field
|
||||
* @param value
|
||||
* @return ApiGetPackageRequest
|
||||
*/
|
||||
func (a *PackageServiceApiService) GetPackage(ctx _context.Context, projectId string, field string, value string) ApiGetPackageRequest {
|
||||
return ApiGetPackageRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
projectId: projectId,
|
||||
field: field,
|
||||
value: value,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return V1GetPackageResponse
|
||||
*/
|
||||
func (a *PackageServiceApiService) GetPackageExecute(r ApiGetPackageRequest) (V1GetPackageResponse, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue V1GetPackageResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PackageServiceApiService.GetPackage")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/v1/projects/{projectId}/packages/{field}/{value}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", _neturl.PathEscape(parameterToString(r.projectId, "")), -1)
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"field"+"}", _neturl.PathEscape(parameterToString(r.field, "")), -1)
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"value"+"}", _neturl.PathEscape(parameterToString(r.value, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v RpcStatus
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiListPackagesRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService PackageServiceApi
|
||||
projectId string
|
||||
page *int32
|
||||
limit *int32
|
||||
filtersId *string
|
||||
filtersName *string
|
||||
filtersModular *bool
|
||||
filtersNameExact *string
|
||||
filtersNoImports *bool
|
||||
filtersNoBuilds *bool
|
||||
}
|
||||
|
||||
func (r ApiListPackagesRequest) Page(page int32) ApiListPackagesRequest {
|
||||
r.page = &page
|
||||
return r
|
||||
}
|
||||
func (r ApiListPackagesRequest) Limit(limit int32) ApiListPackagesRequest {
|
||||
r.limit = &limit
|
||||
return r
|
||||
}
|
||||
func (r ApiListPackagesRequest) FiltersId(filtersId string) ApiListPackagesRequest {
|
||||
r.filtersId = &filtersId
|
||||
return r
|
||||
}
|
||||
func (r ApiListPackagesRequest) FiltersName(filtersName string) ApiListPackagesRequest {
|
||||
r.filtersName = &filtersName
|
||||
return r
|
||||
}
|
||||
func (r ApiListPackagesRequest) FiltersModular(filtersModular bool) ApiListPackagesRequest {
|
||||
r.filtersModular = &filtersModular
|
||||
return r
|
||||
}
|
||||
func (r ApiListPackagesRequest) FiltersNameExact(filtersNameExact string) ApiListPackagesRequest {
|
||||
r.filtersNameExact = &filtersNameExact
|
||||
return r
|
||||
}
|
||||
func (r ApiListPackagesRequest) FiltersNoImports(filtersNoImports bool) ApiListPackagesRequest {
|
||||
r.filtersNoImports = &filtersNoImports
|
||||
return r
|
||||
}
|
||||
func (r ApiListPackagesRequest) FiltersNoBuilds(filtersNoBuilds bool) ApiListPackagesRequest {
|
||||
r.filtersNoBuilds = &filtersNoBuilds
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiListPackagesRequest) Execute() (V1ListPackagesResponse, *_nethttp.Response, error) {
|
||||
return r.ApiService.ListPackagesExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* ListPackages ListPackages returns all packages with filters applied
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId Project ID that should be queried
|
||||
* @return ApiListPackagesRequest
|
||||
*/
|
||||
func (a *PackageServiceApiService) ListPackages(ctx _context.Context, projectId string) ApiListPackagesRequest {
|
||||
return ApiListPackagesRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
projectId: projectId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return V1ListPackagesResponse
|
||||
*/
|
||||
func (a *PackageServiceApiService) ListPackagesExecute(r ApiListPackagesRequest) (V1ListPackagesResponse, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue V1ListPackagesResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PackageServiceApiService.ListPackages")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/v1/projects/{projectId}/packages"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", _neturl.PathEscape(parameterToString(r.projectId, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
|
||||
if r.page != nil {
|
||||
localVarQueryParams.Add("page", parameterToString(*r.page, ""))
|
||||
}
|
||||
if r.limit != nil {
|
||||
localVarQueryParams.Add("limit", parameterToString(*r.limit, ""))
|
||||
}
|
||||
if r.filtersId != nil {
|
||||
localVarQueryParams.Add("filters.id", parameterToString(*r.filtersId, ""))
|
||||
}
|
||||
if r.filtersName != nil {
|
||||
localVarQueryParams.Add("filters.name", parameterToString(*r.filtersName, ""))
|
||||
}
|
||||
if r.filtersModular != nil {
|
||||
localVarQueryParams.Add("filters.modular", parameterToString(*r.filtersModular, ""))
|
||||
}
|
||||
if r.filtersNameExact != nil {
|
||||
localVarQueryParams.Add("filters.nameExact", parameterToString(*r.filtersNameExact, ""))
|
||||
}
|
||||
if r.filtersNoImports != nil {
|
||||
localVarQueryParams.Add("filters.noImports", parameterToString(*r.filtersNoImports, ""))
|
||||
}
|
||||
if r.filtersNoBuilds != nil {
|
||||
localVarQueryParams.Add("filters.noBuilds", parameterToString(*r.filtersNoBuilds, ""))
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v RpcStatus
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
1483
vendor/openapi.peridot.resf.org/peridotopenapi/api_project_service.go
generated
vendored
Normal file
1483
vendor/openapi.peridot.resf.org/peridotopenapi/api_project_service.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
161
vendor/openapi.peridot.resf.org/peridotopenapi/api_search_service.go
generated
vendored
Normal file
161
vendor/openapi.peridot.resf.org/peridotopenapi/api_search_service.go
generated
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
_context "context"
|
||||
_ioutil "io/ioutil"
|
||||
_nethttp "net/http"
|
||||
_neturl "net/url"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
var (
|
||||
_ _context.Context
|
||||
)
|
||||
|
||||
type SearchServiceApi interface {
|
||||
|
||||
/*
|
||||
* Search Method for Search
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return ApiSearchRequest
|
||||
*/
|
||||
Search(ctx _context.Context) ApiSearchRequest
|
||||
|
||||
/*
|
||||
* SearchExecute executes the request
|
||||
* @return StreamResultOfV1SearchResponse
|
||||
*/
|
||||
SearchExecute(r ApiSearchRequest) (StreamResultOfV1SearchResponse, *_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// SearchServiceApiService SearchServiceApi service
|
||||
type SearchServiceApiService service
|
||||
|
||||
type ApiSearchRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService SearchServiceApi
|
||||
body *V1SearchRequest
|
||||
}
|
||||
|
||||
func (r ApiSearchRequest) Body(body V1SearchRequest) ApiSearchRequest {
|
||||
r.body = &body
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiSearchRequest) Execute() (StreamResultOfV1SearchResponse, *_nethttp.Response, error) {
|
||||
return r.ApiService.SearchExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* Search Method for Search
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return ApiSearchRequest
|
||||
*/
|
||||
func (a *SearchServiceApiService) Search(ctx _context.Context) ApiSearchRequest {
|
||||
return ApiSearchRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return StreamResultOfV1SearchResponse
|
||||
*/
|
||||
func (a *SearchServiceApiService) SearchExecute(r ApiSearchRequest) (StreamResultOfV1SearchResponse, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue StreamResultOfV1SearchResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchServiceApiService.Search")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/v1/search"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
if r.body == nil {
|
||||
return localVarReturnValue, nil, reportError("body is required and must be specified")
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{"application/json"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v RpcStatus
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
574
vendor/openapi.peridot.resf.org/peridotopenapi/api_task_service.go
generated
vendored
Normal file
574
vendor/openapi.peridot.resf.org/peridotopenapi/api_task_service.go
generated
vendored
Normal file
@ -0,0 +1,574 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
_context "context"
|
||||
_ioutil "io/ioutil"
|
||||
_nethttp "net/http"
|
||||
_neturl "net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
var (
|
||||
_ _context.Context
|
||||
)
|
||||
|
||||
type TaskServiceApi interface {
|
||||
|
||||
/*
|
||||
* CancelTask CancelTask cancels a task with the given ID. Only parent tasks can be cancelled and if they're in the PENDING or RUNNING state.
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param id
|
||||
* @return ApiCancelTaskRequest
|
||||
*/
|
||||
CancelTask(ctx _context.Context, projectId string, id string) ApiCancelTaskRequest
|
||||
|
||||
/*
|
||||
* CancelTaskExecute executes the request
|
||||
* @return map[string]interface{}
|
||||
*/
|
||||
CancelTaskExecute(r ApiCancelTaskRequest) (map[string]interface{}, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* GetTask GetTask returns a specific task with the given ID
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param id
|
||||
* @return ApiGetTaskRequest
|
||||
*/
|
||||
GetTask(ctx _context.Context, projectId string, id string) ApiGetTaskRequest
|
||||
|
||||
/*
|
||||
* GetTaskExecute executes the request
|
||||
* @return V1GetTaskResponse
|
||||
*/
|
||||
GetTaskExecute(r ApiGetTaskRequest) (V1GetTaskResponse, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* ListTasks ListTasks returns a list of tasks from all projects List mode won't return task responses. The reason being responses being able to reach huge sizes. To get the response for a specific task, you can use GetTask, either on the specific subtask or the parent task.
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @return ApiListTasksRequest
|
||||
*/
|
||||
ListTasks(ctx _context.Context, projectId string) ApiListTasksRequest
|
||||
|
||||
/*
|
||||
* ListTasksExecute executes the request
|
||||
* @return V1ListTasksResponse
|
||||
*/
|
||||
ListTasksExecute(r ApiListTasksRequest) (V1ListTasksResponse, *_nethttp.Response, error)
|
||||
|
||||
/*
|
||||
* StreamTaskLogs StreamTaskLogs streams the logs of a specific task with the given ID
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param id
|
||||
* @return ApiStreamTaskLogsRequest
|
||||
*/
|
||||
StreamTaskLogs(ctx _context.Context, projectId string, id string) ApiStreamTaskLogsRequest
|
||||
|
||||
/*
|
||||
* StreamTaskLogsExecute executes the request
|
||||
* @return StreamResultOfApiHttpBody
|
||||
*/
|
||||
StreamTaskLogsExecute(r ApiStreamTaskLogsRequest) (StreamResultOfApiHttpBody, *_nethttp.Response, error)
|
||||
}
|
||||
|
||||
// TaskServiceApiService TaskServiceApi service
|
||||
type TaskServiceApiService service
|
||||
|
||||
type ApiCancelTaskRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService TaskServiceApi
|
||||
projectId string
|
||||
id string
|
||||
}
|
||||
|
||||
|
||||
func (r ApiCancelTaskRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) {
|
||||
return r.ApiService.CancelTaskExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* CancelTask CancelTask cancels a task with the given ID. Only parent tasks can be cancelled and if they're in the PENDING or RUNNING state.
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param id
|
||||
* @return ApiCancelTaskRequest
|
||||
*/
|
||||
func (a *TaskServiceApiService) CancelTask(ctx _context.Context, projectId string, id string) ApiCancelTaskRequest {
|
||||
return ApiCancelTaskRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return map[string]interface{}
|
||||
*/
|
||||
func (a *TaskServiceApiService) CancelTaskExecute(r ApiCancelTaskRequest) (map[string]interface{}, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue map[string]interface{}
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskServiceApiService.CancelTask")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/v1/projects/{projectId}/tasks/{id}/cancel"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", _neturl.PathEscape(parameterToString(r.projectId, "")), -1)
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(r.id, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v RpcStatus
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiGetTaskRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService TaskServiceApi
|
||||
projectId string
|
||||
id string
|
||||
}
|
||||
|
||||
|
||||
func (r ApiGetTaskRequest) Execute() (V1GetTaskResponse, *_nethttp.Response, error) {
|
||||
return r.ApiService.GetTaskExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* GetTask GetTask returns a specific task with the given ID
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param id
|
||||
* @return ApiGetTaskRequest
|
||||
*/
|
||||
func (a *TaskServiceApiService) GetTask(ctx _context.Context, projectId string, id string) ApiGetTaskRequest {
|
||||
return ApiGetTaskRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return V1GetTaskResponse
|
||||
*/
|
||||
func (a *TaskServiceApiService) GetTaskExecute(r ApiGetTaskRequest) (V1GetTaskResponse, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue V1GetTaskResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskServiceApiService.GetTask")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/v1/projects/{projectId}/tasks/{id}"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", _neturl.PathEscape(parameterToString(r.projectId, "")), -1)
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(r.id, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v RpcStatus
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiListTasksRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService TaskServiceApi
|
||||
projectId string
|
||||
page *int32
|
||||
limit *int32
|
||||
}
|
||||
|
||||
func (r ApiListTasksRequest) Page(page int32) ApiListTasksRequest {
|
||||
r.page = &page
|
||||
return r
|
||||
}
|
||||
func (r ApiListTasksRequest) Limit(limit int32) ApiListTasksRequest {
|
||||
r.limit = &limit
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiListTasksRequest) Execute() (V1ListTasksResponse, *_nethttp.Response, error) {
|
||||
return r.ApiService.ListTasksExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* ListTasks ListTasks returns a list of tasks from all projects List mode won't return task responses. The reason being responses being able to reach huge sizes. To get the response for a specific task, you can use GetTask, either on the specific subtask or the parent task.
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @return ApiListTasksRequest
|
||||
*/
|
||||
func (a *TaskServiceApiService) ListTasks(ctx _context.Context, projectId string) ApiListTasksRequest {
|
||||
return ApiListTasksRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
projectId: projectId,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return V1ListTasksResponse
|
||||
*/
|
||||
func (a *TaskServiceApiService) ListTasksExecute(r ApiListTasksRequest) (V1ListTasksResponse, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue V1ListTasksResponse
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskServiceApiService.ListTasks")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/v1/projects/{projectId}/tasks"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", _neturl.PathEscape(parameterToString(r.projectId, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
|
||||
if r.page != nil {
|
||||
localVarQueryParams.Add("page", parameterToString(*r.page, ""))
|
||||
}
|
||||
if r.limit != nil {
|
||||
localVarQueryParams.Add("limit", parameterToString(*r.limit, ""))
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v RpcStatus
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type ApiStreamTaskLogsRequest struct {
|
||||
ctx _context.Context
|
||||
ApiService TaskServiceApi
|
||||
projectId string
|
||||
id string
|
||||
parent *bool
|
||||
}
|
||||
|
||||
func (r ApiStreamTaskLogsRequest) Parent(parent bool) ApiStreamTaskLogsRequest {
|
||||
r.parent = &parent
|
||||
return r
|
||||
}
|
||||
|
||||
func (r ApiStreamTaskLogsRequest) Execute() (StreamResultOfApiHttpBody, *_nethttp.Response, error) {
|
||||
return r.ApiService.StreamTaskLogsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* StreamTaskLogs StreamTaskLogs streams the logs of a specific task with the given ID
|
||||
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @param projectId
|
||||
* @param id
|
||||
* @return ApiStreamTaskLogsRequest
|
||||
*/
|
||||
func (a *TaskServiceApiService) StreamTaskLogs(ctx _context.Context, projectId string, id string) ApiStreamTaskLogsRequest {
|
||||
return ApiStreamTaskLogsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return StreamResultOfApiHttpBody
|
||||
*/
|
||||
func (a *TaskServiceApiService) StreamTaskLogsExecute(r ApiStreamTaskLogsRequest) (StreamResultOfApiHttpBody, *_nethttp.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = _nethttp.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue StreamResultOfApiHttpBody
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaskServiceApiService.StreamTaskLogs")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/v1/projects/{projectId}/tasks/{id}/logs"
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", _neturl.PathEscape(parameterToString(r.projectId, "")), -1)
|
||||
localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", _neturl.PathEscape(parameterToString(r.id, "")), -1)
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := _neturl.Values{}
|
||||
localVarFormParams := _neturl.Values{}
|
||||
|
||||
if r.parent != nil {
|
||||
localVarQueryParams.Add("parent", parameterToString(*r.parent, ""))
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v RpcStatus
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
550
vendor/openapi.peridot.resf.org/peridotopenapi/client.go
generated
vendored
Normal file
550
vendor/openapi.peridot.resf.org/peridotopenapi/client.go
generated
vendored
Normal file
@ -0,0 +1,550 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
var (
|
||||
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
|
||||
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
|
||||
)
|
||||
|
||||
// APIClient manages communication with the peridot/proto/v1/batch.proto API vversion not set
|
||||
// In most cases there should be only one, shared, APIClient.
|
||||
type APIClient struct {
|
||||
cfg *Configuration
|
||||
common service // Reuse a single struct instead of allocating one for each service on the heap.
|
||||
|
||||
// API Services
|
||||
|
||||
BuildServiceApi BuildServiceApi
|
||||
|
||||
ImportServiceApi ImportServiceApi
|
||||
|
||||
PackageServiceApi PackageServiceApi
|
||||
|
||||
ProjectServiceApi ProjectServiceApi
|
||||
|
||||
SearchServiceApi SearchServiceApi
|
||||
|
||||
TaskServiceApi TaskServiceApi
|
||||
}
|
||||
|
||||
type service struct {
|
||||
client *APIClient
|
||||
}
|
||||
|
||||
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
|
||||
// optionally a custom http.Client to allow for advanced features such as caching.
|
||||
func NewAPIClient(cfg *Configuration) *APIClient {
|
||||
if cfg.HTTPClient == nil {
|
||||
cfg.HTTPClient = http.DefaultClient
|
||||
}
|
||||
|
||||
c := &APIClient{}
|
||||
c.cfg = cfg
|
||||
c.common.client = c
|
||||
|
||||
// API Services
|
||||
c.BuildServiceApi = (*BuildServiceApiService)(&c.common)
|
||||
c.ImportServiceApi = (*ImportServiceApiService)(&c.common)
|
||||
c.PackageServiceApi = (*PackageServiceApiService)(&c.common)
|
||||
c.ProjectServiceApi = (*ProjectServiceApiService)(&c.common)
|
||||
c.SearchServiceApi = (*SearchServiceApiService)(&c.common)
|
||||
c.TaskServiceApi = (*TaskServiceApiService)(&c.common)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
func atoi(in string) (int, error) {
|
||||
return strconv.Atoi(in)
|
||||
}
|
||||
|
||||
// selectHeaderContentType select a content type from the available list.
|
||||
func selectHeaderContentType(contentTypes []string) string {
|
||||
if len(contentTypes) == 0 {
|
||||
return ""
|
||||
}
|
||||
if contains(contentTypes, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
return contentTypes[0] // use the first content type specified in 'consumes'
|
||||
}
|
||||
|
||||
// selectHeaderAccept join all accept types and return
|
||||
func selectHeaderAccept(accepts []string) string {
|
||||
if len(accepts) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
if contains(accepts, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
|
||||
return strings.Join(accepts, ",")
|
||||
}
|
||||
|
||||
// contains is a case insenstive match, finding needle in a haystack
|
||||
func contains(haystack []string, needle string) bool {
|
||||
for _, a := range haystack {
|
||||
if strings.ToLower(a) == strings.ToLower(needle) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Verify optional parameters are of the correct type.
|
||||
func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||
// Make sure there is an object.
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check the type is as expected.
|
||||
if reflect.TypeOf(obj).String() != expected {
|
||||
return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
|
||||
func parameterToString(obj interface{}, collectionFormat string) string {
|
||||
var delimiter string
|
||||
|
||||
switch collectionFormat {
|
||||
case "pipes":
|
||||
delimiter = "|"
|
||||
case "ssv":
|
||||
delimiter = " "
|
||||
case "tsv":
|
||||
delimiter = "\t"
|
||||
case "csv":
|
||||
delimiter = ","
|
||||
}
|
||||
|
||||
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
||||
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
|
||||
} else if t, ok := obj.(time.Time); ok {
|
||||
return t.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v", obj)
|
||||
}
|
||||
|
||||
// helper for converting interface{} parameters to json strings
|
||||
func parameterToJson(obj interface{}) (string, error) {
|
||||
jsonBuf, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(jsonBuf), err
|
||||
}
|
||||
|
||||
// callAPI do the request.
|
||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpRequestOut(request, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
|
||||
resp, err := c.cfg.HTTPClient.Do(request)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpResponse(resp, true)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// Allow modification of underlying config for alternate implementations and testing
|
||||
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
|
||||
func (c *APIClient) GetConfig() *Configuration {
|
||||
return c.cfg
|
||||
}
|
||||
|
||||
// prepareRequest build the request
|
||||
func (c *APIClient) prepareRequest(
|
||||
ctx context.Context,
|
||||
path string, method string,
|
||||
postBody interface{},
|
||||
headerParams map[string]string,
|
||||
queryParams url.Values,
|
||||
formParams url.Values,
|
||||
formFileName string,
|
||||
fileName string,
|
||||
fileBytes []byte) (localVarRequest *http.Request, err error) {
|
||||
|
||||
var body *bytes.Buffer
|
||||
|
||||
// Detect postBody type and post.
|
||||
if postBody != nil {
|
||||
contentType := headerParams["Content-Type"]
|
||||
if contentType == "" {
|
||||
contentType = detectContentType(postBody)
|
||||
headerParams["Content-Type"] = contentType
|
||||
}
|
||||
|
||||
body, err = setBody(postBody, contentType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// add form parameters and file if available.
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") {
|
||||
if body != nil {
|
||||
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
w := multipart.NewWriter(body)
|
||||
|
||||
for k, v := range formParams {
|
||||
for _, iv := range v {
|
||||
if strings.HasPrefix(k, "@") { // file
|
||||
err = addFile(w, k[1:], iv)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else { // form value
|
||||
w.WriteField(k, iv)
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(fileBytes) > 0 && fileName != "" {
|
||||
w.Boundary()
|
||||
//_, fileNm := filepath.Split(fileName)
|
||||
part, err := w.CreateFormFile(formFileName, filepath.Base(fileName))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_, err = part.Write(fileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// Set the Boundary in the Content-Type
|
||||
headerParams["Content-Type"] = w.FormDataContentType()
|
||||
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
w.Close()
|
||||
}
|
||||
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
|
||||
if body != nil {
|
||||
return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
body.WriteString(formParams.Encode())
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
}
|
||||
|
||||
// Setup path and query parameters
|
||||
url, err := url.Parse(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Override request host, if applicable
|
||||
if c.cfg.Host != "" {
|
||||
url.Host = c.cfg.Host
|
||||
}
|
||||
|
||||
// Override request scheme, if applicable
|
||||
if c.cfg.Scheme != "" {
|
||||
url.Scheme = c.cfg.Scheme
|
||||
}
|
||||
|
||||
// Adding Query Param
|
||||
query := url.Query()
|
||||
for k, v := range queryParams {
|
||||
for _, iv := range v {
|
||||
query.Add(k, iv)
|
||||
}
|
||||
}
|
||||
|
||||
// Encode the parameters.
|
||||
url.RawQuery = query.Encode()
|
||||
|
||||
// Generate a new request
|
||||
if body != nil {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), body)
|
||||
} else {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), nil)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// add header parameters, if any
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers.Set(h, v)
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
||||
// Add the user agent to the request.
|
||||
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||
|
||||
if ctx != nil {
|
||||
// add context to the request
|
||||
localVarRequest = localVarRequest.WithContext(ctx)
|
||||
|
||||
// Walk through any authentication.
|
||||
|
||||
// OAuth2 authentication
|
||||
if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok {
|
||||
// We were able to grab an oauth2 token from the context
|
||||
var latestToken *oauth2.Token
|
||||
if latestToken, err = tok.Token(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
latestToken.SetAuthHeader(localVarRequest)
|
||||
}
|
||||
|
||||
// Basic HTTP Authentication
|
||||
if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok {
|
||||
localVarRequest.SetBasicAuth(auth.UserName, auth.Password)
|
||||
}
|
||||
|
||||
// AccessToken Authentication
|
||||
if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
|
||||
localVarRequest.Header.Add("Authorization", "Bearer "+auth)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for header, value := range c.cfg.DefaultHeader {
|
||||
localVarRequest.Header.Add(header, value)
|
||||
}
|
||||
return localVarRequest, nil
|
||||
}
|
||||
|
||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||
if len(b) == 0 {
|
||||
return nil
|
||||
}
|
||||
if s, ok := v.(*string); ok {
|
||||
*s = string(b)
|
||||
return nil
|
||||
}
|
||||
if xmlCheck.MatchString(contentType) {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if jsonCheck.MatchString(contentType) {
|
||||
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
|
||||
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
|
||||
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
|
||||
}
|
||||
} else if err = json.Unmarshal(b, v); err != nil { // simple model
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return errors.New("undefined response type")
|
||||
}
|
||||
|
||||
// Add a file to the multipart request
|
||||
func addFile(w *multipart.Writer, fieldName, path string) error {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = io.Copy(part, file)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// Prevent trying to import "fmt"
|
||||
func reportError(format string, a ...interface{}) error {
|
||||
return fmt.Errorf(format, a...)
|
||||
}
|
||||
|
||||
// Set request body from an interface{}
|
||||
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
|
||||
if bodyBuf == nil {
|
||||
bodyBuf = &bytes.Buffer{}
|
||||
}
|
||||
|
||||
if reader, ok := body.(io.Reader); ok {
|
||||
_, err = bodyBuf.ReadFrom(reader)
|
||||
} else if fp, ok := body.(**os.File); ok {
|
||||
_, err = bodyBuf.ReadFrom(*fp)
|
||||
} else if b, ok := body.([]byte); ok {
|
||||
_, err = bodyBuf.Write(b)
|
||||
} else if s, ok := body.(string); ok {
|
||||
_, err = bodyBuf.WriteString(s)
|
||||
} else if s, ok := body.(*string); ok {
|
||||
_, err = bodyBuf.WriteString(*s)
|
||||
} else if jsonCheck.MatchString(contentType) {
|
||||
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||
} else if xmlCheck.MatchString(contentType) {
|
||||
err = xml.NewEncoder(bodyBuf).Encode(body)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if bodyBuf.Len() == 0 {
|
||||
err = fmt.Errorf("Invalid body type %s\n", contentType)
|
||||
return nil, err
|
||||
}
|
||||
return bodyBuf, nil
|
||||
}
|
||||
|
||||
// detectContentType method is used to figure out `Request.Body` content type for request header
|
||||
func detectContentType(body interface{}) string {
|
||||
contentType := "text/plain; charset=utf-8"
|
||||
kind := reflect.TypeOf(body).Kind()
|
||||
|
||||
switch kind {
|
||||
case reflect.Struct, reflect.Map, reflect.Ptr:
|
||||
contentType = "application/json; charset=utf-8"
|
||||
case reflect.String:
|
||||
contentType = "text/plain; charset=utf-8"
|
||||
default:
|
||||
if b, ok := body.([]byte); ok {
|
||||
contentType = http.DetectContentType(b)
|
||||
} else if kind == reflect.Slice {
|
||||
contentType = "application/json; charset=utf-8"
|
||||
}
|
||||
}
|
||||
|
||||
return contentType
|
||||
}
|
||||
|
||||
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
|
||||
type cacheControl map[string]string
|
||||
|
||||
func parseCacheControl(headers http.Header) cacheControl {
|
||||
cc := cacheControl{}
|
||||
ccHeader := headers.Get("Cache-Control")
|
||||
for _, part := range strings.Split(ccHeader, ",") {
|
||||
part = strings.Trim(part, " ")
|
||||
if part == "" {
|
||||
continue
|
||||
}
|
||||
if strings.ContainsRune(part, '=') {
|
||||
keyval := strings.Split(part, "=")
|
||||
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
|
||||
} else {
|
||||
cc[part] = ""
|
||||
}
|
||||
}
|
||||
return cc
|
||||
}
|
||||
|
||||
// CacheExpires helper function to determine remaining time before repeating a request.
|
||||
func CacheExpires(r *http.Response) time.Time {
|
||||
// Figure out when the cache expires.
|
||||
var expires time.Time
|
||||
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
|
||||
if err != nil {
|
||||
return time.Now()
|
||||
}
|
||||
respCacheControl := parseCacheControl(r.Header)
|
||||
|
||||
if maxAge, ok := respCacheControl["max-age"]; ok {
|
||||
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||
if err != nil {
|
||||
expires = now
|
||||
} else {
|
||||
expires = now.Add(lifetime)
|
||||
}
|
||||
} else {
|
||||
expiresHeader := r.Header.Get("Expires")
|
||||
if expiresHeader != "" {
|
||||
expires, err = time.Parse(time.RFC1123, expiresHeader)
|
||||
if err != nil {
|
||||
expires = now
|
||||
}
|
||||
}
|
||||
}
|
||||
return expires
|
||||
}
|
||||
|
||||
func strlen(s string) int {
|
||||
return utf8.RuneCountInString(s)
|
||||
}
|
||||
|
||||
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
|
||||
type GenericOpenAPIError struct {
|
||||
body []byte
|
||||
error string
|
||||
model interface{}
|
||||
}
|
||||
|
||||
// Error returns non-empty string if there was an error.
|
||||
func (e GenericOpenAPIError) Error() string {
|
||||
return e.error
|
||||
}
|
||||
|
||||
// Body returns the raw bytes of the response
|
||||
func (e GenericOpenAPIError) Body() []byte {
|
||||
return e.body
|
||||
}
|
||||
|
||||
// Model returns the unpacked model of the error
|
||||
func (e GenericOpenAPIError) Model() interface{} {
|
||||
return e.model
|
||||
}
|
230
vendor/openapi.peridot.resf.org/peridotopenapi/configuration.go
generated
vendored
Normal file
230
vendor/openapi.peridot.resf.org/peridotopenapi/configuration.go
generated
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// contextKeys are used to identify the type of value in the context.
|
||||
// Since these are string, it is possible to get a short description of the
|
||||
// context key for logging and debugging using key.String().
|
||||
|
||||
type contextKey string
|
||||
|
||||
func (c contextKey) String() string {
|
||||
return "auth " + string(c)
|
||||
}
|
||||
|
||||
var (
|
||||
// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
|
||||
ContextOAuth2 = contextKey("token")
|
||||
|
||||
// ContextBasicAuth takes BasicAuth as authentication for the request.
|
||||
ContextBasicAuth = contextKey("basic")
|
||||
|
||||
// ContextAccessToken takes a string oauth2 access token as authentication for the request.
|
||||
ContextAccessToken = contextKey("accesstoken")
|
||||
|
||||
// ContextAPIKeys takes a string apikey as authentication for the request
|
||||
ContextAPIKeys = contextKey("apiKeys")
|
||||
|
||||
// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
|
||||
ContextHttpSignatureAuth = contextKey("httpsignature")
|
||||
|
||||
// ContextServerIndex uses a server configuration from the index.
|
||||
ContextServerIndex = contextKey("serverIndex")
|
||||
|
||||
// ContextOperationServerIndices uses a server configuration from the index mapping.
|
||||
ContextOperationServerIndices = contextKey("serverOperationIndices")
|
||||
|
||||
// ContextServerVariables overrides a server configuration variables.
|
||||
ContextServerVariables = contextKey("serverVariables")
|
||||
|
||||
// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
|
||||
ContextOperationServerVariables = contextKey("serverOperationVariables")
|
||||
)
|
||||
|
||||
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
|
||||
type BasicAuth struct {
|
||||
UserName string `json:"userName,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
|
||||
type APIKey struct {
|
||||
Key string
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// ServerVariable stores the information about a server variable
|
||||
type ServerVariable struct {
|
||||
Description string
|
||||
DefaultValue string
|
||||
EnumValues []string
|
||||
}
|
||||
|
||||
// ServerConfiguration stores the information about a server
|
||||
type ServerConfiguration struct {
|
||||
URL string
|
||||
Description string
|
||||
Variables map[string]ServerVariable
|
||||
}
|
||||
|
||||
// ServerConfigurations stores multiple ServerConfiguration items
|
||||
type ServerConfigurations []ServerConfiguration
|
||||
|
||||
// Configuration stores the configuration of the API client
|
||||
type Configuration struct {
|
||||
Host string `json:"host,omitempty"`
|
||||
Scheme string `json:"scheme,omitempty"`
|
||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||
UserAgent string `json:"userAgent,omitempty"`
|
||||
Debug bool `json:"debug,omitempty"`
|
||||
Servers ServerConfigurations
|
||||
OperationServers map[string]ServerConfigurations
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// NewConfiguration returns a new Configuration object
|
||||
func NewConfiguration() *Configuration {
|
||||
cfg := &Configuration{
|
||||
DefaultHeader: make(map[string]string),
|
||||
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||
Debug: false,
|
||||
Servers: ServerConfigurations{
|
||||
{
|
||||
URL: "",
|
||||
Description: "No description provided",
|
||||
},
|
||||
},
|
||||
OperationServers: map[string]ServerConfigurations{
|
||||
},
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
// AddDefaultHeader adds a new HTTP header to the default header in the request
|
||||
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||
c.DefaultHeader[key] = value
|
||||
}
|
||||
|
||||
// URL formats template on a index using given variables
|
||||
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
|
||||
if index < 0 || len(sc) <= index {
|
||||
return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1)
|
||||
}
|
||||
server := sc[index]
|
||||
url := server.URL
|
||||
|
||||
// go through variables and replace placeholders
|
||||
for name, variable := range server.Variables {
|
||||
if value, ok := variables[name]; ok {
|
||||
found := bool(len(variable.EnumValues) == 0)
|
||||
for _, enumValue := range variable.EnumValues {
|
||||
if value == enumValue {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
|
||||
}
|
||||
url = strings.Replace(url, "{"+name+"}", value, -1)
|
||||
} else {
|
||||
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
|
||||
}
|
||||
}
|
||||
return url, nil
|
||||
}
|
||||
|
||||
// ServerURL returns URL based on server settings
|
||||
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
|
||||
return c.Servers.URL(index, variables)
|
||||
}
|
||||
|
||||
func getServerIndex(ctx context.Context) (int, error) {
|
||||
si := ctx.Value(ContextServerIndex)
|
||||
if si != nil {
|
||||
if index, ok := si.(int); ok {
|
||||
return index, nil
|
||||
}
|
||||
return 0, reportError("Invalid type %T should be int", si)
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
|
||||
osi := ctx.Value(ContextOperationServerIndices)
|
||||
if osi != nil {
|
||||
if operationIndices, ok := osi.(map[string]int); !ok {
|
||||
return 0, reportError("Invalid type %T should be map[string]int", osi)
|
||||
} else {
|
||||
index, ok := operationIndices[endpoint]
|
||||
if ok {
|
||||
return index, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return getServerIndex(ctx)
|
||||
}
|
||||
|
||||
func getServerVariables(ctx context.Context) (map[string]string, error) {
|
||||
sv := ctx.Value(ContextServerVariables)
|
||||
if sv != nil {
|
||||
if variables, ok := sv.(map[string]string); ok {
|
||||
return variables, nil
|
||||
}
|
||||
return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
|
||||
osv := ctx.Value(ContextOperationServerVariables)
|
||||
if osv != nil {
|
||||
if operationVariables, ok := osv.(map[string]map[string]string); !ok {
|
||||
return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
|
||||
} else {
|
||||
variables, ok := operationVariables[endpoint]
|
||||
if ok {
|
||||
return variables, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return getServerVariables(ctx)
|
||||
}
|
||||
|
||||
// ServerURLWithContext returns a new server URL given an endpoint
|
||||
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
|
||||
sc, ok := c.OperationServers[endpoint]
|
||||
if !ok {
|
||||
sc = c.Servers
|
||||
}
|
||||
|
||||
if ctx == nil {
|
||||
return sc.URL(0, nil)
|
||||
}
|
||||
|
||||
index, err := getServerOperationIndex(ctx, endpoint)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
variables, err := getServerOperationVariables(ctx, endpoint)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return sc.URL(index, variables)
|
||||
}
|
58
vendor/openapi.peridot.resf.org/peridotopenapi/git_push.sh
generated
vendored
Normal file
58
vendor/openapi.peridot.resf.org/peridotopenapi/git_push.sh
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
7
vendor/openapi.peridot.resf.org/peridotopenapi/go.mod
generated
vendored
Normal file
7
vendor/openapi.peridot.resf.org/peridotopenapi/go.mod
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
module github.com/GIT_USER_ID/GIT_REPO_ID
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99
|
||||
)
|
13
vendor/openapi.peridot.resf.org/peridotopenapi/go.sum
generated
vendored
Normal file
13
vendor/openapi.peridot.resf.org/peridotopenapi/go.sum
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
190
vendor/openapi.peridot.resf.org/peridotopenapi/model_api_http_body.go
generated
vendored
Normal file
190
vendor/openapi.peridot.resf.org/peridotopenapi/model_api_http_body.go
generated
vendored
Normal file
@ -0,0 +1,190 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// ApiHttpBody Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
|
||||
type ApiHttpBody struct {
|
||||
// The HTTP Content-Type header value specifying the content type of the body.
|
||||
ContentType *string `json:"contentType,omitempty"`
|
||||
// The HTTP request/response body as raw binary.
|
||||
Data *string `json:"data,omitempty"`
|
||||
// Application specific response metadata. Must be set in the first response for streaming APIs.
|
||||
Extensions *[]ProtobufAny `json:"extensions,omitempty"`
|
||||
}
|
||||
|
||||
// NewApiHttpBody instantiates a new ApiHttpBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewApiHttpBody() *ApiHttpBody {
|
||||
this := ApiHttpBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewApiHttpBodyWithDefaults instantiates a new ApiHttpBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewApiHttpBodyWithDefaults() *ApiHttpBody {
|
||||
this := ApiHttpBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetContentType returns the ContentType field value if set, zero value otherwise.
|
||||
func (o *ApiHttpBody) GetContentType() string {
|
||||
if o == nil || o.ContentType == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ContentType
|
||||
}
|
||||
|
||||
// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ApiHttpBody) GetContentTypeOk() (*string, bool) {
|
||||
if o == nil || o.ContentType == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ContentType, true
|
||||
}
|
||||
|
||||
// HasContentType returns a boolean if a field has been set.
|
||||
func (o *ApiHttpBody) HasContentType() bool {
|
||||
if o != nil && o.ContentType != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetContentType gets a reference to the given string and assigns it to the ContentType field.
|
||||
func (o *ApiHttpBody) SetContentType(v string) {
|
||||
o.ContentType = &v
|
||||
}
|
||||
|
||||
// GetData returns the Data field value if set, zero value otherwise.
|
||||
func (o *ApiHttpBody) GetData() string {
|
||||
if o == nil || o.Data == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Data
|
||||
}
|
||||
|
||||
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ApiHttpBody) GetDataOk() (*string, bool) {
|
||||
if o == nil || o.Data == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Data, true
|
||||
}
|
||||
|
||||
// HasData returns a boolean if a field has been set.
|
||||
func (o *ApiHttpBody) HasData() bool {
|
||||
if o != nil && o.Data != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetData gets a reference to the given string and assigns it to the Data field.
|
||||
func (o *ApiHttpBody) SetData(v string) {
|
||||
o.Data = &v
|
||||
}
|
||||
|
||||
// GetExtensions returns the Extensions field value if set, zero value otherwise.
|
||||
func (o *ApiHttpBody) GetExtensions() []ProtobufAny {
|
||||
if o == nil || o.Extensions == nil {
|
||||
var ret []ProtobufAny
|
||||
return ret
|
||||
}
|
||||
return *o.Extensions
|
||||
}
|
||||
|
||||
// GetExtensionsOk returns a tuple with the Extensions field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ApiHttpBody) GetExtensionsOk() (*[]ProtobufAny, bool) {
|
||||
if o == nil || o.Extensions == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Extensions, true
|
||||
}
|
||||
|
||||
// HasExtensions returns a boolean if a field has been set.
|
||||
func (o *ApiHttpBody) HasExtensions() bool {
|
||||
if o != nil && o.Extensions != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetExtensions gets a reference to the given []ProtobufAny and assigns it to the Extensions field.
|
||||
func (o *ApiHttpBody) SetExtensions(v []ProtobufAny) {
|
||||
o.Extensions = &v
|
||||
}
|
||||
|
||||
func (o ApiHttpBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.ContentType != nil {
|
||||
toSerialize["contentType"] = o.ContentType
|
||||
}
|
||||
if o.Data != nil {
|
||||
toSerialize["data"] = o.Data
|
||||
}
|
||||
if o.Extensions != nil {
|
||||
toSerialize["extensions"] = o.Extensions
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableApiHttpBody struct {
|
||||
value *ApiHttpBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableApiHttpBody) Get() *ApiHttpBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableApiHttpBody) Set(val *ApiHttpBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableApiHttpBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableApiHttpBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableApiHttpBody(val *ApiHttpBody) *NullableApiHttpBody {
|
||||
return &NullableApiHttpBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableApiHttpBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableApiHttpBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_import_package_request_is_the_request_message_for_import_service_import_package.go
generated
vendored
Normal file
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_import_package_request_is_the_request_message_for_import_service_import_package.go
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage struct for ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage
|
||||
type ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage struct {
|
||||
PackageName *string `json:"packageName,omitempty"`
|
||||
PackageId *string `json:"packageId,omitempty"`
|
||||
Vre *V1VersionRelease `json:"vre,omitempty"`
|
||||
SetInactive *bool `json:"setInactive,omitempty"`
|
||||
}
|
||||
|
||||
// NewImportPackageRequestIsTheRequestMessageForImportServiceImportPackage instantiates a new ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewImportPackageRequestIsTheRequestMessageForImportServiceImportPackage() *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage {
|
||||
this := ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewImportPackageRequestIsTheRequestMessageForImportServiceImportPackageWithDefaults instantiates a new ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewImportPackageRequestIsTheRequestMessageForImportServiceImportPackageWithDefaults() *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage {
|
||||
this := ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPackageName returns the PackageName field value if set, zero value otherwise.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetPackageName() string {
|
||||
if o == nil || o.PackageName == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PackageName
|
||||
}
|
||||
|
||||
// GetPackageNameOk returns a tuple with the PackageName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetPackageNameOk() (*string, bool) {
|
||||
if o == nil || o.PackageName == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.PackageName, true
|
||||
}
|
||||
|
||||
// HasPackageName returns a boolean if a field has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) HasPackageName() bool {
|
||||
if o != nil && o.PackageName != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackageName gets a reference to the given string and assigns it to the PackageName field.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) SetPackageName(v string) {
|
||||
o.PackageName = &v
|
||||
}
|
||||
|
||||
// GetPackageId returns the PackageId field value if set, zero value otherwise.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetPackageId() string {
|
||||
if o == nil || o.PackageId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PackageId
|
||||
}
|
||||
|
||||
// GetPackageIdOk returns a tuple with the PackageId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetPackageIdOk() (*string, bool) {
|
||||
if o == nil || o.PackageId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.PackageId, true
|
||||
}
|
||||
|
||||
// HasPackageId returns a boolean if a field has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) HasPackageId() bool {
|
||||
if o != nil && o.PackageId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackageId gets a reference to the given string and assigns it to the PackageId field.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) SetPackageId(v string) {
|
||||
o.PackageId = &v
|
||||
}
|
||||
|
||||
// GetVre returns the Vre field value if set, zero value otherwise.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetVre() V1VersionRelease {
|
||||
if o == nil || o.Vre == nil {
|
||||
var ret V1VersionRelease
|
||||
return ret
|
||||
}
|
||||
return *o.Vre
|
||||
}
|
||||
|
||||
// GetVreOk returns a tuple with the Vre field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetVreOk() (*V1VersionRelease, bool) {
|
||||
if o == nil || o.Vre == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Vre, true
|
||||
}
|
||||
|
||||
// HasVre returns a boolean if a field has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) HasVre() bool {
|
||||
if o != nil && o.Vre != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVre gets a reference to the given V1VersionRelease and assigns it to the Vre field.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) SetVre(v V1VersionRelease) {
|
||||
o.Vre = &v
|
||||
}
|
||||
|
||||
// GetSetInactive returns the SetInactive field value if set, zero value otherwise.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetSetInactive() bool {
|
||||
if o == nil || o.SetInactive == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.SetInactive
|
||||
}
|
||||
|
||||
// GetSetInactiveOk returns a tuple with the SetInactive field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) GetSetInactiveOk() (*bool, bool) {
|
||||
if o == nil || o.SetInactive == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SetInactive, true
|
||||
}
|
||||
|
||||
// HasSetInactive returns a boolean if a field has been set.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) HasSetInactive() bool {
|
||||
if o != nil && o.SetInactive != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSetInactive gets a reference to the given bool and assigns it to the SetInactive field.
|
||||
func (o *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) SetSetInactive(v bool) {
|
||||
o.SetInactive = &v
|
||||
}
|
||||
|
||||
func (o ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.PackageName != nil {
|
||||
toSerialize["packageName"] = o.PackageName
|
||||
}
|
||||
if o.PackageId != nil {
|
||||
toSerialize["packageId"] = o.PackageId
|
||||
}
|
||||
if o.Vre != nil {
|
||||
toSerialize["vre"] = o.Vre
|
||||
}
|
||||
if o.SetInactive != nil {
|
||||
toSerialize["setInactive"] = o.SetInactive
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage struct {
|
||||
value *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) Get() *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) Set(val *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage(val *ImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) *NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage {
|
||||
return &NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableImportPackageRequestIsTheRequestMessageForImportServiceImportPackage) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject struct for InlineObject
|
||||
type InlineObject struct {
|
||||
Project *V1Project `json:"project,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject instantiates a new InlineObject object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject() *InlineObject {
|
||||
this := InlineObject{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObjectWithDefaults instantiates a new InlineObject object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObjectWithDefaults() *InlineObject {
|
||||
this := InlineObject{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProject returns the Project field value if set, zero value otherwise.
|
||||
func (o *InlineObject) GetProject() V1Project {
|
||||
if o == nil || o.Project == nil {
|
||||
var ret V1Project
|
||||
return ret
|
||||
}
|
||||
return *o.Project
|
||||
}
|
||||
|
||||
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject) GetProjectOk() (*V1Project, bool) {
|
||||
if o == nil || o.Project == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Project, true
|
||||
}
|
||||
|
||||
// HasProject returns a boolean if a field has been set.
|
||||
func (o *InlineObject) HasProject() bool {
|
||||
if o != nil && o.Project != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProject gets a reference to the given V1Project and assigns it to the Project field.
|
||||
func (o *InlineObject) SetProject(v V1Project) {
|
||||
o.Project = &v
|
||||
}
|
||||
|
||||
func (o InlineObject) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Project != nil {
|
||||
toSerialize["project"] = o.Project
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject struct {
|
||||
value *InlineObject
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject) Get() *InlineObject {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject) Set(val *InlineObject) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject(val *InlineObject) *NullableInlineObject {
|
||||
return &NullableInlineObject{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_1.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_1.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject1 struct for InlineObject1
|
||||
type InlineObject1 struct {
|
||||
Builds *[]V1SubmitBuildRequest `json:"builds,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject1 instantiates a new InlineObject1 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject1() *InlineObject1 {
|
||||
this := InlineObject1{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject1WithDefaults instantiates a new InlineObject1 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject1WithDefaults() *InlineObject1 {
|
||||
this := InlineObject1{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBuilds returns the Builds field value if set, zero value otherwise.
|
||||
func (o *InlineObject1) GetBuilds() []V1SubmitBuildRequest {
|
||||
if o == nil || o.Builds == nil {
|
||||
var ret []V1SubmitBuildRequest
|
||||
return ret
|
||||
}
|
||||
return *o.Builds
|
||||
}
|
||||
|
||||
// GetBuildsOk returns a tuple with the Builds field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject1) GetBuildsOk() (*[]V1SubmitBuildRequest, bool) {
|
||||
if o == nil || o.Builds == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Builds, true
|
||||
}
|
||||
|
||||
// HasBuilds returns a boolean if a field has been set.
|
||||
func (o *InlineObject1) HasBuilds() bool {
|
||||
if o != nil && o.Builds != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBuilds gets a reference to the given []V1SubmitBuildRequest and assigns it to the Builds field.
|
||||
func (o *InlineObject1) SetBuilds(v []V1SubmitBuildRequest) {
|
||||
o.Builds = &v
|
||||
}
|
||||
|
||||
func (o InlineObject1) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Builds != nil {
|
||||
toSerialize["builds"] = o.Builds
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject1 struct {
|
||||
value *InlineObject1
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject1) Get() *InlineObject1 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject1) Set(val *InlineObject1) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject1) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject1) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject1(val *InlineObject1) *NullableInlineObject1 {
|
||||
return &NullableInlineObject1{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject1) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject1) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
367
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_2.go
generated
vendored
Normal file
367
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_2.go
generated
vendored
Normal file
@ -0,0 +1,367 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject2 struct for InlineObject2
|
||||
type InlineObject2 struct {
|
||||
PackageName *string `json:"packageName,omitempty"`
|
||||
PackageId *string `json:"packageId,omitempty"`
|
||||
ScmHash *string `json:"scmHash,omitempty"`
|
||||
DisableChecks *bool `json:"disableChecks,omitempty"`
|
||||
Branches *[]string `json:"branches,omitempty"`
|
||||
ModuleVariant *bool `json:"moduleVariant,omitempty"`
|
||||
SideNvrs *[]string `json:"sideNvrs,omitempty"`
|
||||
SetInactive *bool `json:"setInactive,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject2 instantiates a new InlineObject2 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject2() *InlineObject2 {
|
||||
this := InlineObject2{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject2WithDefaults instantiates a new InlineObject2 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject2WithDefaults() *InlineObject2 {
|
||||
this := InlineObject2{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPackageName returns the PackageName field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetPackageName() string {
|
||||
if o == nil || o.PackageName == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PackageName
|
||||
}
|
||||
|
||||
// GetPackageNameOk returns a tuple with the PackageName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetPackageNameOk() (*string, bool) {
|
||||
if o == nil || o.PackageName == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.PackageName, true
|
||||
}
|
||||
|
||||
// HasPackageName returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasPackageName() bool {
|
||||
if o != nil && o.PackageName != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackageName gets a reference to the given string and assigns it to the PackageName field.
|
||||
func (o *InlineObject2) SetPackageName(v string) {
|
||||
o.PackageName = &v
|
||||
}
|
||||
|
||||
// GetPackageId returns the PackageId field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetPackageId() string {
|
||||
if o == nil || o.PackageId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PackageId
|
||||
}
|
||||
|
||||
// GetPackageIdOk returns a tuple with the PackageId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetPackageIdOk() (*string, bool) {
|
||||
if o == nil || o.PackageId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.PackageId, true
|
||||
}
|
||||
|
||||
// HasPackageId returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasPackageId() bool {
|
||||
if o != nil && o.PackageId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackageId gets a reference to the given string and assigns it to the PackageId field.
|
||||
func (o *InlineObject2) SetPackageId(v string) {
|
||||
o.PackageId = &v
|
||||
}
|
||||
|
||||
// GetScmHash returns the ScmHash field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetScmHash() string {
|
||||
if o == nil || o.ScmHash == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ScmHash
|
||||
}
|
||||
|
||||
// GetScmHashOk returns a tuple with the ScmHash field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetScmHashOk() (*string, bool) {
|
||||
if o == nil || o.ScmHash == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ScmHash, true
|
||||
}
|
||||
|
||||
// HasScmHash returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasScmHash() bool {
|
||||
if o != nil && o.ScmHash != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetScmHash gets a reference to the given string and assigns it to the ScmHash field.
|
||||
func (o *InlineObject2) SetScmHash(v string) {
|
||||
o.ScmHash = &v
|
||||
}
|
||||
|
||||
// GetDisableChecks returns the DisableChecks field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetDisableChecks() bool {
|
||||
if o == nil || o.DisableChecks == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.DisableChecks
|
||||
}
|
||||
|
||||
// GetDisableChecksOk returns a tuple with the DisableChecks field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetDisableChecksOk() (*bool, bool) {
|
||||
if o == nil || o.DisableChecks == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.DisableChecks, true
|
||||
}
|
||||
|
||||
// HasDisableChecks returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasDisableChecks() bool {
|
||||
if o != nil && o.DisableChecks != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDisableChecks gets a reference to the given bool and assigns it to the DisableChecks field.
|
||||
func (o *InlineObject2) SetDisableChecks(v bool) {
|
||||
o.DisableChecks = &v
|
||||
}
|
||||
|
||||
// GetBranches returns the Branches field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetBranches() []string {
|
||||
if o == nil || o.Branches == nil {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return *o.Branches
|
||||
}
|
||||
|
||||
// GetBranchesOk returns a tuple with the Branches field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetBranchesOk() (*[]string, bool) {
|
||||
if o == nil || o.Branches == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Branches, true
|
||||
}
|
||||
|
||||
// HasBranches returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasBranches() bool {
|
||||
if o != nil && o.Branches != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBranches gets a reference to the given []string and assigns it to the Branches field.
|
||||
func (o *InlineObject2) SetBranches(v []string) {
|
||||
o.Branches = &v
|
||||
}
|
||||
|
||||
// GetModuleVariant returns the ModuleVariant field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetModuleVariant() bool {
|
||||
if o == nil || o.ModuleVariant == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.ModuleVariant
|
||||
}
|
||||
|
||||
// GetModuleVariantOk returns a tuple with the ModuleVariant field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetModuleVariantOk() (*bool, bool) {
|
||||
if o == nil || o.ModuleVariant == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ModuleVariant, true
|
||||
}
|
||||
|
||||
// HasModuleVariant returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasModuleVariant() bool {
|
||||
if o != nil && o.ModuleVariant != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetModuleVariant gets a reference to the given bool and assigns it to the ModuleVariant field.
|
||||
func (o *InlineObject2) SetModuleVariant(v bool) {
|
||||
o.ModuleVariant = &v
|
||||
}
|
||||
|
||||
// GetSideNvrs returns the SideNvrs field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetSideNvrs() []string {
|
||||
if o == nil || o.SideNvrs == nil {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return *o.SideNvrs
|
||||
}
|
||||
|
||||
// GetSideNvrsOk returns a tuple with the SideNvrs field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetSideNvrsOk() (*[]string, bool) {
|
||||
if o == nil || o.SideNvrs == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SideNvrs, true
|
||||
}
|
||||
|
||||
// HasSideNvrs returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasSideNvrs() bool {
|
||||
if o != nil && o.SideNvrs != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSideNvrs gets a reference to the given []string and assigns it to the SideNvrs field.
|
||||
func (o *InlineObject2) SetSideNvrs(v []string) {
|
||||
o.SideNvrs = &v
|
||||
}
|
||||
|
||||
// GetSetInactive returns the SetInactive field value if set, zero value otherwise.
|
||||
func (o *InlineObject2) GetSetInactive() bool {
|
||||
if o == nil || o.SetInactive == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.SetInactive
|
||||
}
|
||||
|
||||
// GetSetInactiveOk returns a tuple with the SetInactive field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject2) GetSetInactiveOk() (*bool, bool) {
|
||||
if o == nil || o.SetInactive == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SetInactive, true
|
||||
}
|
||||
|
||||
// HasSetInactive returns a boolean if a field has been set.
|
||||
func (o *InlineObject2) HasSetInactive() bool {
|
||||
if o != nil && o.SetInactive != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSetInactive gets a reference to the given bool and assigns it to the SetInactive field.
|
||||
func (o *InlineObject2) SetSetInactive(v bool) {
|
||||
o.SetInactive = &v
|
||||
}
|
||||
|
||||
func (o InlineObject2) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.PackageName != nil {
|
||||
toSerialize["packageName"] = o.PackageName
|
||||
}
|
||||
if o.PackageId != nil {
|
||||
toSerialize["packageId"] = o.PackageId
|
||||
}
|
||||
if o.ScmHash != nil {
|
||||
toSerialize["scmHash"] = o.ScmHash
|
||||
}
|
||||
if o.DisableChecks != nil {
|
||||
toSerialize["disableChecks"] = o.DisableChecks
|
||||
}
|
||||
if o.Branches != nil {
|
||||
toSerialize["branches"] = o.Branches
|
||||
}
|
||||
if o.ModuleVariant != nil {
|
||||
toSerialize["moduleVariant"] = o.ModuleVariant
|
||||
}
|
||||
if o.SideNvrs != nil {
|
||||
toSerialize["sideNvrs"] = o.SideNvrs
|
||||
}
|
||||
if o.SetInactive != nil {
|
||||
toSerialize["setInactive"] = o.SetInactive
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject2 struct {
|
||||
value *InlineObject2
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject2) Get() *InlineObject2 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject2) Set(val *InlineObject2) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject2) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject2) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject2(val *InlineObject2) *NullableInlineObject2 {
|
||||
return &NullableInlineObject2{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject2) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject2) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
153
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_3.go
generated
vendored
Normal file
153
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_3.go
generated
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject3 struct for InlineObject3
|
||||
type InlineObject3 struct {
|
||||
// Previously uploaded RPM tarball
|
||||
Rpms *string `json:"rpms,omitempty"`
|
||||
// Overwrite existing RPMs even if NVRA is locked Useful for secure boot scenarios for example
|
||||
ForceOverride *bool `json:"forceOverride,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject3 instantiates a new InlineObject3 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject3() *InlineObject3 {
|
||||
this := InlineObject3{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject3WithDefaults instantiates a new InlineObject3 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject3WithDefaults() *InlineObject3 {
|
||||
this := InlineObject3{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetRpms returns the Rpms field value if set, zero value otherwise.
|
||||
func (o *InlineObject3) GetRpms() string {
|
||||
if o == nil || o.Rpms == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Rpms
|
||||
}
|
||||
|
||||
// GetRpmsOk returns a tuple with the Rpms field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject3) GetRpmsOk() (*string, bool) {
|
||||
if o == nil || o.Rpms == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Rpms, true
|
||||
}
|
||||
|
||||
// HasRpms returns a boolean if a field has been set.
|
||||
func (o *InlineObject3) HasRpms() bool {
|
||||
if o != nil && o.Rpms != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRpms gets a reference to the given string and assigns it to the Rpms field.
|
||||
func (o *InlineObject3) SetRpms(v string) {
|
||||
o.Rpms = &v
|
||||
}
|
||||
|
||||
// GetForceOverride returns the ForceOverride field value if set, zero value otherwise.
|
||||
func (o *InlineObject3) GetForceOverride() bool {
|
||||
if o == nil || o.ForceOverride == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.ForceOverride
|
||||
}
|
||||
|
||||
// GetForceOverrideOk returns a tuple with the ForceOverride field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject3) GetForceOverrideOk() (*bool, bool) {
|
||||
if o == nil || o.ForceOverride == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ForceOverride, true
|
||||
}
|
||||
|
||||
// HasForceOverride returns a boolean if a field has been set.
|
||||
func (o *InlineObject3) HasForceOverride() bool {
|
||||
if o != nil && o.ForceOverride != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetForceOverride gets a reference to the given bool and assigns it to the ForceOverride field.
|
||||
func (o *InlineObject3) SetForceOverride(v bool) {
|
||||
o.ForceOverride = &v
|
||||
}
|
||||
|
||||
func (o InlineObject3) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Rpms != nil {
|
||||
toSerialize["rpms"] = o.Rpms
|
||||
}
|
||||
if o.ForceOverride != nil {
|
||||
toSerialize["forceOverride"] = o.ForceOverride
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject3 struct {
|
||||
value *InlineObject3
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject3) Get() *InlineObject3 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject3) Set(val *InlineObject3) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject3) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject3) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject3(val *InlineObject3) *NullableInlineObject3 {
|
||||
return &NullableInlineObject3{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject3) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject3) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
153
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_4.go
generated
vendored
Normal file
153
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_4.go
generated
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject4 struct for InlineObject4
|
||||
type InlineObject4 struct {
|
||||
// Previously uploaded RPM tarball
|
||||
LookasideBlobs *[]string `json:"lookasideBlobs,omitempty"`
|
||||
// Overwrite existing RPMs even if NVRA is locked Useful for secure boot scenarios for example
|
||||
ForceOverride *bool `json:"forceOverride,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject4 instantiates a new InlineObject4 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject4() *InlineObject4 {
|
||||
this := InlineObject4{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject4WithDefaults instantiates a new InlineObject4 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject4WithDefaults() *InlineObject4 {
|
||||
this := InlineObject4{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLookasideBlobs returns the LookasideBlobs field value if set, zero value otherwise.
|
||||
func (o *InlineObject4) GetLookasideBlobs() []string {
|
||||
if o == nil || o.LookasideBlobs == nil {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return *o.LookasideBlobs
|
||||
}
|
||||
|
||||
// GetLookasideBlobsOk returns a tuple with the LookasideBlobs field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject4) GetLookasideBlobsOk() (*[]string, bool) {
|
||||
if o == nil || o.LookasideBlobs == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.LookasideBlobs, true
|
||||
}
|
||||
|
||||
// HasLookasideBlobs returns a boolean if a field has been set.
|
||||
func (o *InlineObject4) HasLookasideBlobs() bool {
|
||||
if o != nil && o.LookasideBlobs != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLookasideBlobs gets a reference to the given []string and assigns it to the LookasideBlobs field.
|
||||
func (o *InlineObject4) SetLookasideBlobs(v []string) {
|
||||
o.LookasideBlobs = &v
|
||||
}
|
||||
|
||||
// GetForceOverride returns the ForceOverride field value if set, zero value otherwise.
|
||||
func (o *InlineObject4) GetForceOverride() bool {
|
||||
if o == nil || o.ForceOverride == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.ForceOverride
|
||||
}
|
||||
|
||||
// GetForceOverrideOk returns a tuple with the ForceOverride field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject4) GetForceOverrideOk() (*bool, bool) {
|
||||
if o == nil || o.ForceOverride == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ForceOverride, true
|
||||
}
|
||||
|
||||
// HasForceOverride returns a boolean if a field has been set.
|
||||
func (o *InlineObject4) HasForceOverride() bool {
|
||||
if o != nil && o.ForceOverride != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetForceOverride gets a reference to the given bool and assigns it to the ForceOverride field.
|
||||
func (o *InlineObject4) SetForceOverride(v bool) {
|
||||
o.ForceOverride = &v
|
||||
}
|
||||
|
||||
func (o InlineObject4) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.LookasideBlobs != nil {
|
||||
toSerialize["lookasideBlobs"] = o.LookasideBlobs
|
||||
}
|
||||
if o.ForceOverride != nil {
|
||||
toSerialize["forceOverride"] = o.ForceOverride
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject4 struct {
|
||||
value *InlineObject4
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject4) Get() *InlineObject4 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject4) Set(val *InlineObject4) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject4) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject4) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject4(val *InlineObject4) *NullableInlineObject4 {
|
||||
return &NullableInlineObject4{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject4) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject4) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_5.go
generated
vendored
Normal file
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_5.go
generated
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject5 struct for InlineObject5
|
||||
type InlineObject5 struct {
|
||||
ScmUrl *string `json:"scmUrl,omitempty"`
|
||||
Branch *string `json:"branch,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject5 instantiates a new InlineObject5 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject5() *InlineObject5 {
|
||||
this := InlineObject5{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject5WithDefaults instantiates a new InlineObject5 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject5WithDefaults() *InlineObject5 {
|
||||
this := InlineObject5{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetScmUrl returns the ScmUrl field value if set, zero value otherwise.
|
||||
func (o *InlineObject5) GetScmUrl() string {
|
||||
if o == nil || o.ScmUrl == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ScmUrl
|
||||
}
|
||||
|
||||
// GetScmUrlOk returns a tuple with the ScmUrl field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject5) GetScmUrlOk() (*string, bool) {
|
||||
if o == nil || o.ScmUrl == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ScmUrl, true
|
||||
}
|
||||
|
||||
// HasScmUrl returns a boolean if a field has been set.
|
||||
func (o *InlineObject5) HasScmUrl() bool {
|
||||
if o != nil && o.ScmUrl != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetScmUrl gets a reference to the given string and assigns it to the ScmUrl field.
|
||||
func (o *InlineObject5) SetScmUrl(v string) {
|
||||
o.ScmUrl = &v
|
||||
}
|
||||
|
||||
// GetBranch returns the Branch field value if set, zero value otherwise.
|
||||
func (o *InlineObject5) GetBranch() string {
|
||||
if o == nil || o.Branch == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Branch
|
||||
}
|
||||
|
||||
// GetBranchOk returns a tuple with the Branch field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject5) GetBranchOk() (*string, bool) {
|
||||
if o == nil || o.Branch == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Branch, true
|
||||
}
|
||||
|
||||
// HasBranch returns a boolean if a field has been set.
|
||||
func (o *InlineObject5) HasBranch() bool {
|
||||
if o != nil && o.Branch != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBranch gets a reference to the given string and assigns it to the Branch field.
|
||||
func (o *InlineObject5) SetBranch(v string) {
|
||||
o.Branch = &v
|
||||
}
|
||||
|
||||
func (o InlineObject5) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.ScmUrl != nil {
|
||||
toSerialize["scmUrl"] = o.ScmUrl
|
||||
}
|
||||
if o.Branch != nil {
|
||||
toSerialize["branch"] = o.Branch
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject5 struct {
|
||||
value *InlineObject5
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject5) Get() *InlineObject5 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject5) Set(val *InlineObject5) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject5) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject5) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject5(val *InlineObject5) *NullableInlineObject5 {
|
||||
return &NullableInlineObject5{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject5) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject5) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_6.go
generated
vendored
Normal file
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_6.go
generated
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject6 struct for InlineObject6
|
||||
type InlineObject6 struct {
|
||||
GitlabUsername *string `json:"gitlabUsername,omitempty"`
|
||||
GitlabPassword *string `json:"gitlabPassword,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject6 instantiates a new InlineObject6 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject6() *InlineObject6 {
|
||||
this := InlineObject6{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject6WithDefaults instantiates a new InlineObject6 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject6WithDefaults() *InlineObject6 {
|
||||
this := InlineObject6{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetGitlabUsername returns the GitlabUsername field value if set, zero value otherwise.
|
||||
func (o *InlineObject6) GetGitlabUsername() string {
|
||||
if o == nil || o.GitlabUsername == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.GitlabUsername
|
||||
}
|
||||
|
||||
// GetGitlabUsernameOk returns a tuple with the GitlabUsername field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject6) GetGitlabUsernameOk() (*string, bool) {
|
||||
if o == nil || o.GitlabUsername == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.GitlabUsername, true
|
||||
}
|
||||
|
||||
// HasGitlabUsername returns a boolean if a field has been set.
|
||||
func (o *InlineObject6) HasGitlabUsername() bool {
|
||||
if o != nil && o.GitlabUsername != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetGitlabUsername gets a reference to the given string and assigns it to the GitlabUsername field.
|
||||
func (o *InlineObject6) SetGitlabUsername(v string) {
|
||||
o.GitlabUsername = &v
|
||||
}
|
||||
|
||||
// GetGitlabPassword returns the GitlabPassword field value if set, zero value otherwise.
|
||||
func (o *InlineObject6) GetGitlabPassword() string {
|
||||
if o == nil || o.GitlabPassword == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.GitlabPassword
|
||||
}
|
||||
|
||||
// GetGitlabPasswordOk returns a tuple with the GitlabPassword field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject6) GetGitlabPasswordOk() (*string, bool) {
|
||||
if o == nil || o.GitlabPassword == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.GitlabPassword, true
|
||||
}
|
||||
|
||||
// HasGitlabPassword returns a boolean if a field has been set.
|
||||
func (o *InlineObject6) HasGitlabPassword() bool {
|
||||
if o != nil && o.GitlabPassword != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetGitlabPassword gets a reference to the given string and assigns it to the GitlabPassword field.
|
||||
func (o *InlineObject6) SetGitlabPassword(v string) {
|
||||
o.GitlabPassword = &v
|
||||
}
|
||||
|
||||
func (o InlineObject6) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.GitlabUsername != nil {
|
||||
toSerialize["gitlabUsername"] = o.GitlabUsername
|
||||
}
|
||||
if o.GitlabPassword != nil {
|
||||
toSerialize["gitlabPassword"] = o.GitlabPassword
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject6 struct {
|
||||
value *InlineObject6
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject6) Get() *InlineObject6 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject6) Set(val *InlineObject6) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject6) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject6) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject6(val *InlineObject6) *NullableInlineObject6 {
|
||||
return &NullableInlineObject6{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject6) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject6) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_7.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_7.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject7 struct for InlineObject7
|
||||
type InlineObject7 struct {
|
||||
Imports *[]V1ImportPackageRequest `json:"imports,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject7 instantiates a new InlineObject7 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject7() *InlineObject7 {
|
||||
this := InlineObject7{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject7WithDefaults instantiates a new InlineObject7 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject7WithDefaults() *InlineObject7 {
|
||||
this := InlineObject7{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetImports returns the Imports field value if set, zero value otherwise.
|
||||
func (o *InlineObject7) GetImports() []V1ImportPackageRequest {
|
||||
if o == nil || o.Imports == nil {
|
||||
var ret []V1ImportPackageRequest
|
||||
return ret
|
||||
}
|
||||
return *o.Imports
|
||||
}
|
||||
|
||||
// GetImportsOk returns a tuple with the Imports field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject7) GetImportsOk() (*[]V1ImportPackageRequest, bool) {
|
||||
if o == nil || o.Imports == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Imports, true
|
||||
}
|
||||
|
||||
// HasImports returns a boolean if a field has been set.
|
||||
func (o *InlineObject7) HasImports() bool {
|
||||
if o != nil && o.Imports != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImports gets a reference to the given []V1ImportPackageRequest and assigns it to the Imports field.
|
||||
func (o *InlineObject7) SetImports(v []V1ImportPackageRequest) {
|
||||
o.Imports = &v
|
||||
}
|
||||
|
||||
func (o InlineObject7) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Imports != nil {
|
||||
toSerialize["imports"] = o.Imports
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject7 struct {
|
||||
value *InlineObject7
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject7) Get() *InlineObject7 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject7) Set(val *InlineObject7) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject7) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject7) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject7(val *InlineObject7) *NullableInlineObject7 {
|
||||
return &NullableInlineObject7{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject7) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject7) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_8.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_inline_object_8.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// InlineObject8 struct for InlineObject8
|
||||
type InlineObject8 struct {
|
||||
Repositories *[]string `json:"repositories,omitempty"`
|
||||
}
|
||||
|
||||
// NewInlineObject8 instantiates a new InlineObject8 object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewInlineObject8() *InlineObject8 {
|
||||
this := InlineObject8{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInlineObject8WithDefaults instantiates a new InlineObject8 object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewInlineObject8WithDefaults() *InlineObject8 {
|
||||
this := InlineObject8{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetRepositories returns the Repositories field value if set, zero value otherwise.
|
||||
func (o *InlineObject8) GetRepositories() []string {
|
||||
if o == nil || o.Repositories == nil {
|
||||
var ret []string
|
||||
return ret
|
||||
}
|
||||
return *o.Repositories
|
||||
}
|
||||
|
||||
// GetRepositoriesOk returns a tuple with the Repositories field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InlineObject8) GetRepositoriesOk() (*[]string, bool) {
|
||||
if o == nil || o.Repositories == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Repositories, true
|
||||
}
|
||||
|
||||
// HasRepositories returns a boolean if a field has been set.
|
||||
func (o *InlineObject8) HasRepositories() bool {
|
||||
if o != nil && o.Repositories != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRepositories gets a reference to the given []string and assigns it to the Repositories field.
|
||||
func (o *InlineObject8) SetRepositories(v []string) {
|
||||
o.Repositories = &v
|
||||
}
|
||||
|
||||
func (o InlineObject8) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Repositories != nil {
|
||||
toSerialize["repositories"] = o.Repositories
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableInlineObject8 struct {
|
||||
value *InlineObject8
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInlineObject8) Get() *InlineObject8 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject8) Set(val *InlineObject8) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInlineObject8) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject8) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInlineObject8(val *InlineObject8) *NullableInlineObject8 {
|
||||
return &NullableInlineObject8{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInlineObject8) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInlineObject8) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
116
vendor/openapi.peridot.resf.org/peridotopenapi/model_protobuf_any.go
generated
vendored
Normal file
116
vendor/openapi.peridot.resf.org/peridotopenapi/model_protobuf_any.go
generated
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// ProtobufAny `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": <string>, \"lastName\": <string> } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }
|
||||
type ProtobufAny struct {
|
||||
// A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.
|
||||
Type *string `json:"@type,omitempty"`
|
||||
}
|
||||
|
||||
// NewProtobufAny instantiates a new ProtobufAny object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewProtobufAny() *ProtobufAny {
|
||||
this := ProtobufAny{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewProtobufAnyWithDefaults instantiates a new ProtobufAny object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewProtobufAnyWithDefaults() *ProtobufAny {
|
||||
this := ProtobufAny{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetType returns the Type field value if set, zero value otherwise.
|
||||
func (o *ProtobufAny) GetType() string {
|
||||
if o == nil || o.Type == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ProtobufAny) GetTypeOk() (*string, bool) {
|
||||
if o == nil || o.Type == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Type, true
|
||||
}
|
||||
|
||||
// HasType returns a boolean if a field has been set.
|
||||
func (o *ProtobufAny) HasType() bool {
|
||||
if o != nil && o.Type != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetType gets a reference to the given string and assigns it to the Type field.
|
||||
func (o *ProtobufAny) SetType(v string) {
|
||||
o.Type = &v
|
||||
}
|
||||
|
||||
func (o ProtobufAny) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Type != nil {
|
||||
toSerialize["@type"] = o.Type
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableProtobufAny struct {
|
||||
value *ProtobufAny
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableProtobufAny) Get() *ProtobufAny {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableProtobufAny) Set(val *ProtobufAny) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableProtobufAny) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableProtobufAny) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableProtobufAny(val *ProtobufAny) *NullableProtobufAny {
|
||||
return &NullableProtobufAny{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableProtobufAny) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableProtobufAny) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
187
vendor/openapi.peridot.resf.org/peridotopenapi/model_rpc_status.go
generated
vendored
Normal file
187
vendor/openapi.peridot.resf.org/peridotopenapi/model_rpc_status.go
generated
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// RpcStatus struct for RpcStatus
|
||||
type RpcStatus struct {
|
||||
Code *int32 `json:"code,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Details *[]ProtobufAny `json:"details,omitempty"`
|
||||
}
|
||||
|
||||
// NewRpcStatus instantiates a new RpcStatus object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewRpcStatus() *RpcStatus {
|
||||
this := RpcStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRpcStatusWithDefaults instantiates a new RpcStatus object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewRpcStatusWithDefaults() *RpcStatus {
|
||||
this := RpcStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCode returns the Code field value if set, zero value otherwise.
|
||||
func (o *RpcStatus) GetCode() int32 {
|
||||
if o == nil || o.Code == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Code
|
||||
}
|
||||
|
||||
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RpcStatus) GetCodeOk() (*int32, bool) {
|
||||
if o == nil || o.Code == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Code, true
|
||||
}
|
||||
|
||||
// HasCode returns a boolean if a field has been set.
|
||||
func (o *RpcStatus) HasCode() bool {
|
||||
if o != nil && o.Code != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCode gets a reference to the given int32 and assigns it to the Code field.
|
||||
func (o *RpcStatus) SetCode(v int32) {
|
||||
o.Code = &v
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value if set, zero value otherwise.
|
||||
func (o *RpcStatus) GetMessage() string {
|
||||
if o == nil || o.Message == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Message
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RpcStatus) GetMessageOk() (*string, bool) {
|
||||
if o == nil || o.Message == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Message, true
|
||||
}
|
||||
|
||||
// HasMessage returns a boolean if a field has been set.
|
||||
func (o *RpcStatus) HasMessage() bool {
|
||||
if o != nil && o.Message != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
||||
func (o *RpcStatus) SetMessage(v string) {
|
||||
o.Message = &v
|
||||
}
|
||||
|
||||
// GetDetails returns the Details field value if set, zero value otherwise.
|
||||
func (o *RpcStatus) GetDetails() []ProtobufAny {
|
||||
if o == nil || o.Details == nil {
|
||||
var ret []ProtobufAny
|
||||
return ret
|
||||
}
|
||||
return *o.Details
|
||||
}
|
||||
|
||||
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RpcStatus) GetDetailsOk() (*[]ProtobufAny, bool) {
|
||||
if o == nil || o.Details == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Details, true
|
||||
}
|
||||
|
||||
// HasDetails returns a boolean if a field has been set.
|
||||
func (o *RpcStatus) HasDetails() bool {
|
||||
if o != nil && o.Details != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDetails gets a reference to the given []ProtobufAny and assigns it to the Details field.
|
||||
func (o *RpcStatus) SetDetails(v []ProtobufAny) {
|
||||
o.Details = &v
|
||||
}
|
||||
|
||||
func (o RpcStatus) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Code != nil {
|
||||
toSerialize["code"] = o.Code
|
||||
}
|
||||
if o.Message != nil {
|
||||
toSerialize["message"] = o.Message
|
||||
}
|
||||
if o.Details != nil {
|
||||
toSerialize["details"] = o.Details
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRpcStatus struct {
|
||||
value *RpcStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRpcStatus) Get() *RpcStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRpcStatus) Set(val *RpcStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRpcStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRpcStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRpcStatus(val *RpcStatus) *NullableRpcStatus {
|
||||
return &NullableRpcStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRpcStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRpcStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_stream_result_of_api_http_body.go
generated
vendored
Normal file
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_stream_result_of_api_http_body.go
generated
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// StreamResultOfApiHttpBody struct for StreamResultOfApiHttpBody
|
||||
type StreamResultOfApiHttpBody struct {
|
||||
Result *ApiHttpBody `json:"result,omitempty"`
|
||||
Error *RpcStatus `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// NewStreamResultOfApiHttpBody instantiates a new StreamResultOfApiHttpBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewStreamResultOfApiHttpBody() *StreamResultOfApiHttpBody {
|
||||
this := StreamResultOfApiHttpBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewStreamResultOfApiHttpBodyWithDefaults instantiates a new StreamResultOfApiHttpBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewStreamResultOfApiHttpBodyWithDefaults() *StreamResultOfApiHttpBody {
|
||||
this := StreamResultOfApiHttpBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetResult returns the Result field value if set, zero value otherwise.
|
||||
func (o *StreamResultOfApiHttpBody) GetResult() ApiHttpBody {
|
||||
if o == nil || o.Result == nil {
|
||||
var ret ApiHttpBody
|
||||
return ret
|
||||
}
|
||||
return *o.Result
|
||||
}
|
||||
|
||||
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *StreamResultOfApiHttpBody) GetResultOk() (*ApiHttpBody, bool) {
|
||||
if o == nil || o.Result == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Result, true
|
||||
}
|
||||
|
||||
// HasResult returns a boolean if a field has been set.
|
||||
func (o *StreamResultOfApiHttpBody) HasResult() bool {
|
||||
if o != nil && o.Result != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetResult gets a reference to the given ApiHttpBody and assigns it to the Result field.
|
||||
func (o *StreamResultOfApiHttpBody) SetResult(v ApiHttpBody) {
|
||||
o.Result = &v
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *StreamResultOfApiHttpBody) GetError() RpcStatus {
|
||||
if o == nil || o.Error == nil {
|
||||
var ret RpcStatus
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *StreamResultOfApiHttpBody) GetErrorOk() (*RpcStatus, bool) {
|
||||
if o == nil || o.Error == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *StreamResultOfApiHttpBody) HasError() bool {
|
||||
if o != nil && o.Error != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given RpcStatus and assigns it to the Error field.
|
||||
func (o *StreamResultOfApiHttpBody) SetError(v RpcStatus) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
func (o StreamResultOfApiHttpBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Result != nil {
|
||||
toSerialize["result"] = o.Result
|
||||
}
|
||||
if o.Error != nil {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableStreamResultOfApiHttpBody struct {
|
||||
value *StreamResultOfApiHttpBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableStreamResultOfApiHttpBody) Get() *StreamResultOfApiHttpBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableStreamResultOfApiHttpBody) Set(val *StreamResultOfApiHttpBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableStreamResultOfApiHttpBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableStreamResultOfApiHttpBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableStreamResultOfApiHttpBody(val *StreamResultOfApiHttpBody) *NullableStreamResultOfApiHttpBody {
|
||||
return &NullableStreamResultOfApiHttpBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableStreamResultOfApiHttpBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableStreamResultOfApiHttpBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_stream_result_of_v1_search_response.go
generated
vendored
Normal file
151
vendor/openapi.peridot.resf.org/peridotopenapi/model_stream_result_of_v1_search_response.go
generated
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// StreamResultOfV1SearchResponse struct for StreamResultOfV1SearchResponse
|
||||
type StreamResultOfV1SearchResponse struct {
|
||||
Result *V1SearchResponse `json:"result,omitempty"`
|
||||
Error *RpcStatus `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// NewStreamResultOfV1SearchResponse instantiates a new StreamResultOfV1SearchResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewStreamResultOfV1SearchResponse() *StreamResultOfV1SearchResponse {
|
||||
this := StreamResultOfV1SearchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewStreamResultOfV1SearchResponseWithDefaults instantiates a new StreamResultOfV1SearchResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewStreamResultOfV1SearchResponseWithDefaults() *StreamResultOfV1SearchResponse {
|
||||
this := StreamResultOfV1SearchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetResult returns the Result field value if set, zero value otherwise.
|
||||
func (o *StreamResultOfV1SearchResponse) GetResult() V1SearchResponse {
|
||||
if o == nil || o.Result == nil {
|
||||
var ret V1SearchResponse
|
||||
return ret
|
||||
}
|
||||
return *o.Result
|
||||
}
|
||||
|
||||
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *StreamResultOfV1SearchResponse) GetResultOk() (*V1SearchResponse, bool) {
|
||||
if o == nil || o.Result == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Result, true
|
||||
}
|
||||
|
||||
// HasResult returns a boolean if a field has been set.
|
||||
func (o *StreamResultOfV1SearchResponse) HasResult() bool {
|
||||
if o != nil && o.Result != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetResult gets a reference to the given V1SearchResponse and assigns it to the Result field.
|
||||
func (o *StreamResultOfV1SearchResponse) SetResult(v V1SearchResponse) {
|
||||
o.Result = &v
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *StreamResultOfV1SearchResponse) GetError() RpcStatus {
|
||||
if o == nil || o.Error == nil {
|
||||
var ret RpcStatus
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *StreamResultOfV1SearchResponse) GetErrorOk() (*RpcStatus, bool) {
|
||||
if o == nil || o.Error == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *StreamResultOfV1SearchResponse) HasError() bool {
|
||||
if o != nil && o.Error != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given RpcStatus and assigns it to the Error field.
|
||||
func (o *StreamResultOfV1SearchResponse) SetError(v RpcStatus) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
func (o StreamResultOfV1SearchResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Result != nil {
|
||||
toSerialize["result"] = o.Result
|
||||
}
|
||||
if o.Error != nil {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableStreamResultOfV1SearchResponse struct {
|
||||
value *StreamResultOfV1SearchResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableStreamResultOfV1SearchResponse) Get() *StreamResultOfV1SearchResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableStreamResultOfV1SearchResponse) Set(val *StreamResultOfV1SearchResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableStreamResultOfV1SearchResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableStreamResultOfV1SearchResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableStreamResultOfV1SearchResponse(val *StreamResultOfV1SearchResponse) *NullableStreamResultOfV1SearchResponse {
|
||||
return &NullableStreamResultOfV1SearchResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableStreamResultOfV1SearchResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableStreamResultOfV1SearchResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
187
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_async_task.go
generated
vendored
Normal file
187
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_async_task.go
generated
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1AsyncTask AsyncTask represents a collection of subunits of tasks that wholly works towards a specific goal.
|
||||
type V1AsyncTask struct {
|
||||
TaskId *string `json:"taskId,omitempty"`
|
||||
Subtasks *[]V1Subtask `json:"subtasks,omitempty"`
|
||||
Done *bool `json:"done,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1AsyncTask instantiates a new V1AsyncTask object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1AsyncTask() *V1AsyncTask {
|
||||
this := V1AsyncTask{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1AsyncTaskWithDefaults instantiates a new V1AsyncTask object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1AsyncTaskWithDefaults() *V1AsyncTask {
|
||||
this := V1AsyncTask{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetTaskId returns the TaskId field value if set, zero value otherwise.
|
||||
func (o *V1AsyncTask) GetTaskId() string {
|
||||
if o == nil || o.TaskId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.TaskId
|
||||
}
|
||||
|
||||
// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1AsyncTask) GetTaskIdOk() (*string, bool) {
|
||||
if o == nil || o.TaskId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.TaskId, true
|
||||
}
|
||||
|
||||
// HasTaskId returns a boolean if a field has been set.
|
||||
func (o *V1AsyncTask) HasTaskId() bool {
|
||||
if o != nil && o.TaskId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTaskId gets a reference to the given string and assigns it to the TaskId field.
|
||||
func (o *V1AsyncTask) SetTaskId(v string) {
|
||||
o.TaskId = &v
|
||||
}
|
||||
|
||||
// GetSubtasks returns the Subtasks field value if set, zero value otherwise.
|
||||
func (o *V1AsyncTask) GetSubtasks() []V1Subtask {
|
||||
if o == nil || o.Subtasks == nil {
|
||||
var ret []V1Subtask
|
||||
return ret
|
||||
}
|
||||
return *o.Subtasks
|
||||
}
|
||||
|
||||
// GetSubtasksOk returns a tuple with the Subtasks field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1AsyncTask) GetSubtasksOk() (*[]V1Subtask, bool) {
|
||||
if o == nil || o.Subtasks == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Subtasks, true
|
||||
}
|
||||
|
||||
// HasSubtasks returns a boolean if a field has been set.
|
||||
func (o *V1AsyncTask) HasSubtasks() bool {
|
||||
if o != nil && o.Subtasks != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubtasks gets a reference to the given []V1Subtask and assigns it to the Subtasks field.
|
||||
func (o *V1AsyncTask) SetSubtasks(v []V1Subtask) {
|
||||
o.Subtasks = &v
|
||||
}
|
||||
|
||||
// GetDone returns the Done field value if set, zero value otherwise.
|
||||
func (o *V1AsyncTask) GetDone() bool {
|
||||
if o == nil || o.Done == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.Done
|
||||
}
|
||||
|
||||
// GetDoneOk returns a tuple with the Done field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1AsyncTask) GetDoneOk() (*bool, bool) {
|
||||
if o == nil || o.Done == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Done, true
|
||||
}
|
||||
|
||||
// HasDone returns a boolean if a field has been set.
|
||||
func (o *V1AsyncTask) HasDone() bool {
|
||||
if o != nil && o.Done != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDone gets a reference to the given bool and assigns it to the Done field.
|
||||
func (o *V1AsyncTask) SetDone(v bool) {
|
||||
o.Done = &v
|
||||
}
|
||||
|
||||
func (o V1AsyncTask) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.TaskId != nil {
|
||||
toSerialize["taskId"] = o.TaskId
|
||||
}
|
||||
if o.Subtasks != nil {
|
||||
toSerialize["subtasks"] = o.Subtasks
|
||||
}
|
||||
if o.Done != nil {
|
||||
toSerialize["done"] = o.Done
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1AsyncTask struct {
|
||||
value *V1AsyncTask
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1AsyncTask) Get() *V1AsyncTask {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1AsyncTask) Set(val *V1AsyncTask) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1AsyncTask) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1AsyncTask) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1AsyncTask(val *V1AsyncTask) *NullableV1AsyncTask {
|
||||
return &NullableV1AsyncTask{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1AsyncTask) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1AsyncTask) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
119
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_batch_filter.go
generated
vendored
Normal file
119
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_batch_filter.go
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1BatchFilter struct for V1BatchFilter
|
||||
type V1BatchFilter struct {
|
||||
Status *V1TaskStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1BatchFilter instantiates a new V1BatchFilter object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1BatchFilter() *V1BatchFilter {
|
||||
this := V1BatchFilter{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1BatchFilterWithDefaults instantiates a new V1BatchFilter object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1BatchFilterWithDefaults() *V1BatchFilter {
|
||||
this := V1BatchFilter{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *V1BatchFilter) GetStatus() V1TaskStatus {
|
||||
if o == nil || o.Status == nil {
|
||||
var ret V1TaskStatus
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BatchFilter) GetStatusOk() (*V1TaskStatus, bool) {
|
||||
if o == nil || o.Status == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *V1BatchFilter) HasStatus() bool {
|
||||
if o != nil && o.Status != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given V1TaskStatus and assigns it to the Status field.
|
||||
func (o *V1BatchFilter) SetStatus(v V1TaskStatus) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o V1BatchFilter) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Status != nil {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1BatchFilter struct {
|
||||
value *V1BatchFilter
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1BatchFilter) Get() *V1BatchFilter {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1BatchFilter) Set(val *V1BatchFilter) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1BatchFilter) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1BatchFilter) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1BatchFilter(val *V1BatchFilter) *NullableV1BatchFilter {
|
||||
return &NullableV1BatchFilter{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1BatchFilter) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1BatchFilter) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
300
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_build.go
generated
vendored
Normal file
300
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_build.go
generated
vendored
Normal file
@ -0,0 +1,300 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// V1Build struct for V1Build
|
||||
type V1Build struct {
|
||||
Id *string `json:"id,omitempty"`
|
||||
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
ImportRevisions *[]V1ImportRevision `json:"importRevisions,omitempty"`
|
||||
TaskId *string `json:"taskId,omitempty"`
|
||||
Status *V1TaskStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1Build instantiates a new V1Build object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1Build() *V1Build {
|
||||
this := V1Build{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1BuildWithDefaults instantiates a new V1Build object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1BuildWithDefaults() *V1Build {
|
||||
this := V1Build{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *V1Build) GetId() string {
|
||||
if o == nil || o.Id == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Build) GetIdOk() (*string, bool) {
|
||||
if o == nil || o.Id == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *V1Build) HasId() bool {
|
||||
if o != nil && o.Id != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *V1Build) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *V1Build) GetCreatedAt() time.Time {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Build) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *V1Build) HasCreatedAt() bool {
|
||||
if o != nil && o.CreatedAt != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *V1Build) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *V1Build) GetName() string {
|
||||
if o == nil || o.Name == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Name
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Build) GetNameOk() (*string, bool) {
|
||||
if o == nil || o.Name == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Name, true
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *V1Build) HasName() bool {
|
||||
if o != nil && o.Name != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *V1Build) SetName(v string) {
|
||||
o.Name = &v
|
||||
}
|
||||
|
||||
// GetImportRevisions returns the ImportRevisions field value if set, zero value otherwise.
|
||||
func (o *V1Build) GetImportRevisions() []V1ImportRevision {
|
||||
if o == nil || o.ImportRevisions == nil {
|
||||
var ret []V1ImportRevision
|
||||
return ret
|
||||
}
|
||||
return *o.ImportRevisions
|
||||
}
|
||||
|
||||
// GetImportRevisionsOk returns a tuple with the ImportRevisions field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Build) GetImportRevisionsOk() (*[]V1ImportRevision, bool) {
|
||||
if o == nil || o.ImportRevisions == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ImportRevisions, true
|
||||
}
|
||||
|
||||
// HasImportRevisions returns a boolean if a field has been set.
|
||||
func (o *V1Build) HasImportRevisions() bool {
|
||||
if o != nil && o.ImportRevisions != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImportRevisions gets a reference to the given []V1ImportRevision and assigns it to the ImportRevisions field.
|
||||
func (o *V1Build) SetImportRevisions(v []V1ImportRevision) {
|
||||
o.ImportRevisions = &v
|
||||
}
|
||||
|
||||
// GetTaskId returns the TaskId field value if set, zero value otherwise.
|
||||
func (o *V1Build) GetTaskId() string {
|
||||
if o == nil || o.TaskId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.TaskId
|
||||
}
|
||||
|
||||
// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Build) GetTaskIdOk() (*string, bool) {
|
||||
if o == nil || o.TaskId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.TaskId, true
|
||||
}
|
||||
|
||||
// HasTaskId returns a boolean if a field has been set.
|
||||
func (o *V1Build) HasTaskId() bool {
|
||||
if o != nil && o.TaskId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTaskId gets a reference to the given string and assigns it to the TaskId field.
|
||||
func (o *V1Build) SetTaskId(v string) {
|
||||
o.TaskId = &v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *V1Build) GetStatus() V1TaskStatus {
|
||||
if o == nil || o.Status == nil {
|
||||
var ret V1TaskStatus
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Build) GetStatusOk() (*V1TaskStatus, bool) {
|
||||
if o == nil || o.Status == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *V1Build) HasStatus() bool {
|
||||
if o != nil && o.Status != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given V1TaskStatus and assigns it to the Status field.
|
||||
func (o *V1Build) SetStatus(v V1TaskStatus) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o V1Build) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Id != nil {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if o.CreatedAt != nil {
|
||||
toSerialize["createdAt"] = o.CreatedAt
|
||||
}
|
||||
if o.Name != nil {
|
||||
toSerialize["name"] = o.Name
|
||||
}
|
||||
if o.ImportRevisions != nil {
|
||||
toSerialize["importRevisions"] = o.ImportRevisions
|
||||
}
|
||||
if o.TaskId != nil {
|
||||
toSerialize["taskId"] = o.TaskId
|
||||
}
|
||||
if o.Status != nil {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1Build struct {
|
||||
value *V1Build
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1Build) Get() *V1Build {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1Build) Set(val *V1Build) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1Build) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1Build) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1Build(val *V1Build) *NullableV1Build {
|
||||
return &NullableV1Build{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1Build) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1Build) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
368
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_build_batch.go
generated
vendored
Normal file
368
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_build_batch.go
generated
vendored
Normal file
@ -0,0 +1,368 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// V1BuildBatch struct for V1BuildBatch
|
||||
type V1BuildBatch struct {
|
||||
Id *string `json:"id,omitempty"`
|
||||
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
||||
Count *int32 `json:"count,omitempty"`
|
||||
Pending *int32 `json:"pending,omitempty"`
|
||||
Running *int32 `json:"running,omitempty"`
|
||||
Succeeded *int32 `json:"succeeded,omitempty"`
|
||||
Failed *int32 `json:"failed,omitempty"`
|
||||
Canceled *int32 `json:"canceled,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1BuildBatch instantiates a new V1BuildBatch object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1BuildBatch() *V1BuildBatch {
|
||||
this := V1BuildBatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1BuildBatchWithDefaults instantiates a new V1BuildBatch object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1BuildBatchWithDefaults() *V1BuildBatch {
|
||||
this := V1BuildBatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetId() string {
|
||||
if o == nil || o.Id == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetIdOk() (*string, bool) {
|
||||
if o == nil || o.Id == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasId() bool {
|
||||
if o != nil && o.Id != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *V1BuildBatch) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetCreatedAt() time.Time {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasCreatedAt() bool {
|
||||
if o != nil && o.CreatedAt != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *V1BuildBatch) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetCount returns the Count field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetCount() int32 {
|
||||
if o == nil || o.Count == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Count
|
||||
}
|
||||
|
||||
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetCountOk() (*int32, bool) {
|
||||
if o == nil || o.Count == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Count, true
|
||||
}
|
||||
|
||||
// HasCount returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasCount() bool {
|
||||
if o != nil && o.Count != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCount gets a reference to the given int32 and assigns it to the Count field.
|
||||
func (o *V1BuildBatch) SetCount(v int32) {
|
||||
o.Count = &v
|
||||
}
|
||||
|
||||
// GetPending returns the Pending field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetPending() int32 {
|
||||
if o == nil || o.Pending == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Pending
|
||||
}
|
||||
|
||||
// GetPendingOk returns a tuple with the Pending field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetPendingOk() (*int32, bool) {
|
||||
if o == nil || o.Pending == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Pending, true
|
||||
}
|
||||
|
||||
// HasPending returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasPending() bool {
|
||||
if o != nil && o.Pending != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPending gets a reference to the given int32 and assigns it to the Pending field.
|
||||
func (o *V1BuildBatch) SetPending(v int32) {
|
||||
o.Pending = &v
|
||||
}
|
||||
|
||||
// GetRunning returns the Running field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetRunning() int32 {
|
||||
if o == nil || o.Running == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Running
|
||||
}
|
||||
|
||||
// GetRunningOk returns a tuple with the Running field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetRunningOk() (*int32, bool) {
|
||||
if o == nil || o.Running == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Running, true
|
||||
}
|
||||
|
||||
// HasRunning returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasRunning() bool {
|
||||
if o != nil && o.Running != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRunning gets a reference to the given int32 and assigns it to the Running field.
|
||||
func (o *V1BuildBatch) SetRunning(v int32) {
|
||||
o.Running = &v
|
||||
}
|
||||
|
||||
// GetSucceeded returns the Succeeded field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetSucceeded() int32 {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Succeeded
|
||||
}
|
||||
|
||||
// GetSucceededOk returns a tuple with the Succeeded field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetSucceededOk() (*int32, bool) {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Succeeded, true
|
||||
}
|
||||
|
||||
// HasSucceeded returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasSucceeded() bool {
|
||||
if o != nil && o.Succeeded != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSucceeded gets a reference to the given int32 and assigns it to the Succeeded field.
|
||||
func (o *V1BuildBatch) SetSucceeded(v int32) {
|
||||
o.Succeeded = &v
|
||||
}
|
||||
|
||||
// GetFailed returns the Failed field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetFailed() int32 {
|
||||
if o == nil || o.Failed == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Failed
|
||||
}
|
||||
|
||||
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetFailedOk() (*int32, bool) {
|
||||
if o == nil || o.Failed == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Failed, true
|
||||
}
|
||||
|
||||
// HasFailed returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasFailed() bool {
|
||||
if o != nil && o.Failed != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFailed gets a reference to the given int32 and assigns it to the Failed field.
|
||||
func (o *V1BuildBatch) SetFailed(v int32) {
|
||||
o.Failed = &v
|
||||
}
|
||||
|
||||
// GetCanceled returns the Canceled field value if set, zero value otherwise.
|
||||
func (o *V1BuildBatch) GetCanceled() int32 {
|
||||
if o == nil || o.Canceled == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Canceled
|
||||
}
|
||||
|
||||
// GetCanceledOk returns a tuple with the Canceled field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildBatch) GetCanceledOk() (*int32, bool) {
|
||||
if o == nil || o.Canceled == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Canceled, true
|
||||
}
|
||||
|
||||
// HasCanceled returns a boolean if a field has been set.
|
||||
func (o *V1BuildBatch) HasCanceled() bool {
|
||||
if o != nil && o.Canceled != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCanceled gets a reference to the given int32 and assigns it to the Canceled field.
|
||||
func (o *V1BuildBatch) SetCanceled(v int32) {
|
||||
o.Canceled = &v
|
||||
}
|
||||
|
||||
func (o V1BuildBatch) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Id != nil {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if o.CreatedAt != nil {
|
||||
toSerialize["createdAt"] = o.CreatedAt
|
||||
}
|
||||
if o.Count != nil {
|
||||
toSerialize["count"] = o.Count
|
||||
}
|
||||
if o.Pending != nil {
|
||||
toSerialize["pending"] = o.Pending
|
||||
}
|
||||
if o.Running != nil {
|
||||
toSerialize["running"] = o.Running
|
||||
}
|
||||
if o.Succeeded != nil {
|
||||
toSerialize["succeeded"] = o.Succeeded
|
||||
}
|
||||
if o.Failed != nil {
|
||||
toSerialize["failed"] = o.Failed
|
||||
}
|
||||
if o.Canceled != nil {
|
||||
toSerialize["canceled"] = o.Canceled
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1BuildBatch struct {
|
||||
value *V1BuildBatch
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1BuildBatch) Get() *V1BuildBatch {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1BuildBatch) Set(val *V1BuildBatch) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1BuildBatch) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1BuildBatch) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1BuildBatch(val *V1BuildBatch) *NullableV1BuildBatch {
|
||||
return &NullableV1BuildBatch{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1BuildBatch) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1BuildBatch) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
119
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_build_filters.go
generated
vendored
Normal file
119
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_build_filters.go
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1BuildFilters struct for V1BuildFilters
|
||||
type V1BuildFilters struct {
|
||||
Status *V1TaskStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1BuildFilters instantiates a new V1BuildFilters object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1BuildFilters() *V1BuildFilters {
|
||||
this := V1BuildFilters{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1BuildFiltersWithDefaults instantiates a new V1BuildFilters object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1BuildFiltersWithDefaults() *V1BuildFilters {
|
||||
this := V1BuildFilters{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *V1BuildFilters) GetStatus() V1TaskStatus {
|
||||
if o == nil || o.Status == nil {
|
||||
var ret V1TaskStatus
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1BuildFilters) GetStatusOk() (*V1TaskStatus, bool) {
|
||||
if o == nil || o.Status == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *V1BuildFilters) HasStatus() bool {
|
||||
if o != nil && o.Status != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given V1TaskStatus and assigns it to the Status field.
|
||||
func (o *V1BuildFilters) SetStatus(v V1TaskStatus) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o V1BuildFilters) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Status != nil {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1BuildFilters struct {
|
||||
value *V1BuildFilters
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1BuildFilters) Get() *V1BuildFilters {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1BuildFilters) Set(val *V1BuildFilters) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1BuildFilters) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1BuildFilters) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1BuildFilters(val *V1BuildFilters) *NullableV1BuildFilters {
|
||||
return &NullableV1BuildFilters{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1BuildFilters) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1BuildFilters) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_create_project_request.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_create_project_request.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1CreateProjectRequest struct for V1CreateProjectRequest
|
||||
type V1CreateProjectRequest struct {
|
||||
Project *V1Project `json:"project,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1CreateProjectRequest instantiates a new V1CreateProjectRequest object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1CreateProjectRequest() *V1CreateProjectRequest {
|
||||
this := V1CreateProjectRequest{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1CreateProjectRequestWithDefaults instantiates a new V1CreateProjectRequest object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1CreateProjectRequestWithDefaults() *V1CreateProjectRequest {
|
||||
this := V1CreateProjectRequest{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProject returns the Project field value if set, zero value otherwise.
|
||||
func (o *V1CreateProjectRequest) GetProject() V1Project {
|
||||
if o == nil || o.Project == nil {
|
||||
var ret V1Project
|
||||
return ret
|
||||
}
|
||||
return *o.Project
|
||||
}
|
||||
|
||||
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1CreateProjectRequest) GetProjectOk() (*V1Project, bool) {
|
||||
if o == nil || o.Project == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Project, true
|
||||
}
|
||||
|
||||
// HasProject returns a boolean if a field has been set.
|
||||
func (o *V1CreateProjectRequest) HasProject() bool {
|
||||
if o != nil && o.Project != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProject gets a reference to the given V1Project and assigns it to the Project field.
|
||||
func (o *V1CreateProjectRequest) SetProject(v V1Project) {
|
||||
o.Project = &v
|
||||
}
|
||||
|
||||
func (o V1CreateProjectRequest) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Project != nil {
|
||||
toSerialize["project"] = o.Project
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1CreateProjectRequest struct {
|
||||
value *V1CreateProjectRequest
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1CreateProjectRequest) Get() *V1CreateProjectRequest {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1CreateProjectRequest) Set(val *V1CreateProjectRequest) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1CreateProjectRequest) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1CreateProjectRequest) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1CreateProjectRequest(val *V1CreateProjectRequest) *NullableV1CreateProjectRequest {
|
||||
return &NullableV1CreateProjectRequest{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1CreateProjectRequest) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1CreateProjectRequest) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_create_project_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_create_project_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1CreateProjectResponse struct for V1CreateProjectResponse
|
||||
type V1CreateProjectResponse struct {
|
||||
Project *V1Project `json:"project,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1CreateProjectResponse instantiates a new V1CreateProjectResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1CreateProjectResponse() *V1CreateProjectResponse {
|
||||
this := V1CreateProjectResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1CreateProjectResponseWithDefaults instantiates a new V1CreateProjectResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1CreateProjectResponseWithDefaults() *V1CreateProjectResponse {
|
||||
this := V1CreateProjectResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProject returns the Project field value if set, zero value otherwise.
|
||||
func (o *V1CreateProjectResponse) GetProject() V1Project {
|
||||
if o == nil || o.Project == nil {
|
||||
var ret V1Project
|
||||
return ret
|
||||
}
|
||||
return *o.Project
|
||||
}
|
||||
|
||||
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1CreateProjectResponse) GetProjectOk() (*V1Project, bool) {
|
||||
if o == nil || o.Project == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Project, true
|
||||
}
|
||||
|
||||
// HasProject returns a boolean if a field has been set.
|
||||
func (o *V1CreateProjectResponse) HasProject() bool {
|
||||
if o != nil && o.Project != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProject gets a reference to the given V1Project and assigns it to the Project field.
|
||||
func (o *V1CreateProjectResponse) SetProject(v V1Project) {
|
||||
o.Project = &v
|
||||
}
|
||||
|
||||
func (o V1CreateProjectResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Project != nil {
|
||||
toSerialize["project"] = o.Project
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1CreateProjectResponse struct {
|
||||
value *V1CreateProjectResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1CreateProjectResponse) Get() *V1CreateProjectResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1CreateProjectResponse) Set(val *V1CreateProjectResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1CreateProjectResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1CreateProjectResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1CreateProjectResponse(val *V1CreateProjectResponse) *NullableV1CreateProjectResponse {
|
||||
return &NullableV1CreateProjectResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1CreateProjectResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1CreateProjectResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
403
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_build_batch_response.go
generated
vendored
Normal file
403
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_build_batch_response.go
generated
vendored
Normal file
@ -0,0 +1,403 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetBuildBatchResponse struct for V1GetBuildBatchResponse
|
||||
type V1GetBuildBatchResponse struct {
|
||||
Builds *[]V1Build `json:"builds,omitempty"`
|
||||
Pending *int32 `json:"pending,omitempty"`
|
||||
Running *int32 `json:"running,omitempty"`
|
||||
Succeeded *int32 `json:"succeeded,omitempty"`
|
||||
Failed *int32 `json:"failed,omitempty"`
|
||||
Canceled *int32 `json:"canceled,omitempty"`
|
||||
Total *string `json:"total,omitempty"`
|
||||
Size *int32 `json:"size,omitempty"`
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetBuildBatchResponse instantiates a new V1GetBuildBatchResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetBuildBatchResponse() *V1GetBuildBatchResponse {
|
||||
this := V1GetBuildBatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetBuildBatchResponseWithDefaults instantiates a new V1GetBuildBatchResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetBuildBatchResponseWithDefaults() *V1GetBuildBatchResponse {
|
||||
this := V1GetBuildBatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBuilds returns the Builds field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetBuilds() []V1Build {
|
||||
if o == nil || o.Builds == nil {
|
||||
var ret []V1Build
|
||||
return ret
|
||||
}
|
||||
return *o.Builds
|
||||
}
|
||||
|
||||
// GetBuildsOk returns a tuple with the Builds field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetBuildsOk() (*[]V1Build, bool) {
|
||||
if o == nil || o.Builds == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Builds, true
|
||||
}
|
||||
|
||||
// HasBuilds returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasBuilds() bool {
|
||||
if o != nil && o.Builds != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBuilds gets a reference to the given []V1Build and assigns it to the Builds field.
|
||||
func (o *V1GetBuildBatchResponse) SetBuilds(v []V1Build) {
|
||||
o.Builds = &v
|
||||
}
|
||||
|
||||
// GetPending returns the Pending field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetPending() int32 {
|
||||
if o == nil || o.Pending == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Pending
|
||||
}
|
||||
|
||||
// GetPendingOk returns a tuple with the Pending field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetPendingOk() (*int32, bool) {
|
||||
if o == nil || o.Pending == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Pending, true
|
||||
}
|
||||
|
||||
// HasPending returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasPending() bool {
|
||||
if o != nil && o.Pending != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPending gets a reference to the given int32 and assigns it to the Pending field.
|
||||
func (o *V1GetBuildBatchResponse) SetPending(v int32) {
|
||||
o.Pending = &v
|
||||
}
|
||||
|
||||
// GetRunning returns the Running field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetRunning() int32 {
|
||||
if o == nil || o.Running == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Running
|
||||
}
|
||||
|
||||
// GetRunningOk returns a tuple with the Running field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetRunningOk() (*int32, bool) {
|
||||
if o == nil || o.Running == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Running, true
|
||||
}
|
||||
|
||||
// HasRunning returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasRunning() bool {
|
||||
if o != nil && o.Running != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRunning gets a reference to the given int32 and assigns it to the Running field.
|
||||
func (o *V1GetBuildBatchResponse) SetRunning(v int32) {
|
||||
o.Running = &v
|
||||
}
|
||||
|
||||
// GetSucceeded returns the Succeeded field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetSucceeded() int32 {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Succeeded
|
||||
}
|
||||
|
||||
// GetSucceededOk returns a tuple with the Succeeded field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetSucceededOk() (*int32, bool) {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Succeeded, true
|
||||
}
|
||||
|
||||
// HasSucceeded returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasSucceeded() bool {
|
||||
if o != nil && o.Succeeded != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSucceeded gets a reference to the given int32 and assigns it to the Succeeded field.
|
||||
func (o *V1GetBuildBatchResponse) SetSucceeded(v int32) {
|
||||
o.Succeeded = &v
|
||||
}
|
||||
|
||||
// GetFailed returns the Failed field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetFailed() int32 {
|
||||
if o == nil || o.Failed == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Failed
|
||||
}
|
||||
|
||||
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetFailedOk() (*int32, bool) {
|
||||
if o == nil || o.Failed == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Failed, true
|
||||
}
|
||||
|
||||
// HasFailed returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasFailed() bool {
|
||||
if o != nil && o.Failed != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFailed gets a reference to the given int32 and assigns it to the Failed field.
|
||||
func (o *V1GetBuildBatchResponse) SetFailed(v int32) {
|
||||
o.Failed = &v
|
||||
}
|
||||
|
||||
// GetCanceled returns the Canceled field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetCanceled() int32 {
|
||||
if o == nil || o.Canceled == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Canceled
|
||||
}
|
||||
|
||||
// GetCanceledOk returns a tuple with the Canceled field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetCanceledOk() (*int32, bool) {
|
||||
if o == nil || o.Canceled == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Canceled, true
|
||||
}
|
||||
|
||||
// HasCanceled returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasCanceled() bool {
|
||||
if o != nil && o.Canceled != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCanceled gets a reference to the given int32 and assigns it to the Canceled field.
|
||||
func (o *V1GetBuildBatchResponse) SetCanceled(v int32) {
|
||||
o.Canceled = &v
|
||||
}
|
||||
|
||||
// GetTotal returns the Total field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetTotal() string {
|
||||
if o == nil || o.Total == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Total
|
||||
}
|
||||
|
||||
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetTotalOk() (*string, bool) {
|
||||
if o == nil || o.Total == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Total, true
|
||||
}
|
||||
|
||||
// HasTotal returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasTotal() bool {
|
||||
if o != nil && o.Total != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotal gets a reference to the given string and assigns it to the Total field.
|
||||
func (o *V1GetBuildBatchResponse) SetTotal(v string) {
|
||||
o.Total = &v
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetSize() int32 {
|
||||
if o == nil || o.Size == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Size
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetSizeOk() (*int32, bool) {
|
||||
if o == nil || o.Size == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Size, true
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasSize() bool {
|
||||
if o != nil && o.Size != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
||||
func (o *V1GetBuildBatchResponse) SetSize(v int32) {
|
||||
o.Size = &v
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildBatchResponse) GetPage() int32 {
|
||||
if o == nil || o.Page == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Page
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildBatchResponse) GetPageOk() (*int32, bool) {
|
||||
if o == nil || o.Page == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Page, true
|
||||
}
|
||||
|
||||
// HasPage returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildBatchResponse) HasPage() bool {
|
||||
if o != nil && o.Page != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
||||
func (o *V1GetBuildBatchResponse) SetPage(v int32) {
|
||||
o.Page = &v
|
||||
}
|
||||
|
||||
func (o V1GetBuildBatchResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Builds != nil {
|
||||
toSerialize["builds"] = o.Builds
|
||||
}
|
||||
if o.Pending != nil {
|
||||
toSerialize["pending"] = o.Pending
|
||||
}
|
||||
if o.Running != nil {
|
||||
toSerialize["running"] = o.Running
|
||||
}
|
||||
if o.Succeeded != nil {
|
||||
toSerialize["succeeded"] = o.Succeeded
|
||||
}
|
||||
if o.Failed != nil {
|
||||
toSerialize["failed"] = o.Failed
|
||||
}
|
||||
if o.Canceled != nil {
|
||||
toSerialize["canceled"] = o.Canceled
|
||||
}
|
||||
if o.Total != nil {
|
||||
toSerialize["total"] = o.Total
|
||||
}
|
||||
if o.Size != nil {
|
||||
toSerialize["size"] = o.Size
|
||||
}
|
||||
if o.Page != nil {
|
||||
toSerialize["page"] = o.Page
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetBuildBatchResponse struct {
|
||||
value *V1GetBuildBatchResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetBuildBatchResponse) Get() *V1GetBuildBatchResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetBuildBatchResponse) Set(val *V1GetBuildBatchResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetBuildBatchResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetBuildBatchResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetBuildBatchResponse(val *V1GetBuildBatchResponse) *NullableV1GetBuildBatchResponse {
|
||||
return &NullableV1GetBuildBatchResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetBuildBatchResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetBuildBatchResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_build_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_build_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetBuildResponse struct for V1GetBuildResponse
|
||||
type V1GetBuildResponse struct {
|
||||
Build *V1Build `json:"build,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetBuildResponse instantiates a new V1GetBuildResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetBuildResponse() *V1GetBuildResponse {
|
||||
this := V1GetBuildResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetBuildResponseWithDefaults instantiates a new V1GetBuildResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetBuildResponseWithDefaults() *V1GetBuildResponse {
|
||||
this := V1GetBuildResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBuild returns the Build field value if set, zero value otherwise.
|
||||
func (o *V1GetBuildResponse) GetBuild() V1Build {
|
||||
if o == nil || o.Build == nil {
|
||||
var ret V1Build
|
||||
return ret
|
||||
}
|
||||
return *o.Build
|
||||
}
|
||||
|
||||
// GetBuildOk returns a tuple with the Build field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetBuildResponse) GetBuildOk() (*V1Build, bool) {
|
||||
if o == nil || o.Build == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Build, true
|
||||
}
|
||||
|
||||
// HasBuild returns a boolean if a field has been set.
|
||||
func (o *V1GetBuildResponse) HasBuild() bool {
|
||||
if o != nil && o.Build != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBuild gets a reference to the given V1Build and assigns it to the Build field.
|
||||
func (o *V1GetBuildResponse) SetBuild(v V1Build) {
|
||||
o.Build = &v
|
||||
}
|
||||
|
||||
func (o V1GetBuildResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Build != nil {
|
||||
toSerialize["build"] = o.Build
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetBuildResponse struct {
|
||||
value *V1GetBuildResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetBuildResponse) Get() *V1GetBuildResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetBuildResponse) Set(val *V1GetBuildResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetBuildResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetBuildResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetBuildResponse(val *V1GetBuildResponse) *NullableV1GetBuildResponse {
|
||||
return &NullableV1GetBuildResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetBuildResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetBuildResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
403
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_import_batch_response.go
generated
vendored
Normal file
403
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_import_batch_response.go
generated
vendored
Normal file
@ -0,0 +1,403 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetImportBatchResponse struct for V1GetImportBatchResponse
|
||||
type V1GetImportBatchResponse struct {
|
||||
Imports *[]V1Import `json:"imports,omitempty"`
|
||||
Pending *int32 `json:"pending,omitempty"`
|
||||
Running *int32 `json:"running,omitempty"`
|
||||
Succeeded *int32 `json:"succeeded,omitempty"`
|
||||
Failed *int32 `json:"failed,omitempty"`
|
||||
Canceled *int32 `json:"canceled,omitempty"`
|
||||
Total *string `json:"total,omitempty"`
|
||||
Size *int32 `json:"size,omitempty"`
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetImportBatchResponse instantiates a new V1GetImportBatchResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetImportBatchResponse() *V1GetImportBatchResponse {
|
||||
this := V1GetImportBatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetImportBatchResponseWithDefaults instantiates a new V1GetImportBatchResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetImportBatchResponseWithDefaults() *V1GetImportBatchResponse {
|
||||
this := V1GetImportBatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetImports returns the Imports field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetImports() []V1Import {
|
||||
if o == nil || o.Imports == nil {
|
||||
var ret []V1Import
|
||||
return ret
|
||||
}
|
||||
return *o.Imports
|
||||
}
|
||||
|
||||
// GetImportsOk returns a tuple with the Imports field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetImportsOk() (*[]V1Import, bool) {
|
||||
if o == nil || o.Imports == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Imports, true
|
||||
}
|
||||
|
||||
// HasImports returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasImports() bool {
|
||||
if o != nil && o.Imports != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImports gets a reference to the given []V1Import and assigns it to the Imports field.
|
||||
func (o *V1GetImportBatchResponse) SetImports(v []V1Import) {
|
||||
o.Imports = &v
|
||||
}
|
||||
|
||||
// GetPending returns the Pending field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetPending() int32 {
|
||||
if o == nil || o.Pending == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Pending
|
||||
}
|
||||
|
||||
// GetPendingOk returns a tuple with the Pending field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetPendingOk() (*int32, bool) {
|
||||
if o == nil || o.Pending == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Pending, true
|
||||
}
|
||||
|
||||
// HasPending returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasPending() bool {
|
||||
if o != nil && o.Pending != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPending gets a reference to the given int32 and assigns it to the Pending field.
|
||||
func (o *V1GetImportBatchResponse) SetPending(v int32) {
|
||||
o.Pending = &v
|
||||
}
|
||||
|
||||
// GetRunning returns the Running field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetRunning() int32 {
|
||||
if o == nil || o.Running == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Running
|
||||
}
|
||||
|
||||
// GetRunningOk returns a tuple with the Running field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetRunningOk() (*int32, bool) {
|
||||
if o == nil || o.Running == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Running, true
|
||||
}
|
||||
|
||||
// HasRunning returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasRunning() bool {
|
||||
if o != nil && o.Running != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRunning gets a reference to the given int32 and assigns it to the Running field.
|
||||
func (o *V1GetImportBatchResponse) SetRunning(v int32) {
|
||||
o.Running = &v
|
||||
}
|
||||
|
||||
// GetSucceeded returns the Succeeded field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetSucceeded() int32 {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Succeeded
|
||||
}
|
||||
|
||||
// GetSucceededOk returns a tuple with the Succeeded field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetSucceededOk() (*int32, bool) {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Succeeded, true
|
||||
}
|
||||
|
||||
// HasSucceeded returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasSucceeded() bool {
|
||||
if o != nil && o.Succeeded != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSucceeded gets a reference to the given int32 and assigns it to the Succeeded field.
|
||||
func (o *V1GetImportBatchResponse) SetSucceeded(v int32) {
|
||||
o.Succeeded = &v
|
||||
}
|
||||
|
||||
// GetFailed returns the Failed field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetFailed() int32 {
|
||||
if o == nil || o.Failed == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Failed
|
||||
}
|
||||
|
||||
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetFailedOk() (*int32, bool) {
|
||||
if o == nil || o.Failed == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Failed, true
|
||||
}
|
||||
|
||||
// HasFailed returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasFailed() bool {
|
||||
if o != nil && o.Failed != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFailed gets a reference to the given int32 and assigns it to the Failed field.
|
||||
func (o *V1GetImportBatchResponse) SetFailed(v int32) {
|
||||
o.Failed = &v
|
||||
}
|
||||
|
||||
// GetCanceled returns the Canceled field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetCanceled() int32 {
|
||||
if o == nil || o.Canceled == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Canceled
|
||||
}
|
||||
|
||||
// GetCanceledOk returns a tuple with the Canceled field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetCanceledOk() (*int32, bool) {
|
||||
if o == nil || o.Canceled == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Canceled, true
|
||||
}
|
||||
|
||||
// HasCanceled returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasCanceled() bool {
|
||||
if o != nil && o.Canceled != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCanceled gets a reference to the given int32 and assigns it to the Canceled field.
|
||||
func (o *V1GetImportBatchResponse) SetCanceled(v int32) {
|
||||
o.Canceled = &v
|
||||
}
|
||||
|
||||
// GetTotal returns the Total field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetTotal() string {
|
||||
if o == nil || o.Total == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Total
|
||||
}
|
||||
|
||||
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetTotalOk() (*string, bool) {
|
||||
if o == nil || o.Total == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Total, true
|
||||
}
|
||||
|
||||
// HasTotal returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasTotal() bool {
|
||||
if o != nil && o.Total != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotal gets a reference to the given string and assigns it to the Total field.
|
||||
func (o *V1GetImportBatchResponse) SetTotal(v string) {
|
||||
o.Total = &v
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetSize() int32 {
|
||||
if o == nil || o.Size == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Size
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetSizeOk() (*int32, bool) {
|
||||
if o == nil || o.Size == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Size, true
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasSize() bool {
|
||||
if o != nil && o.Size != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
||||
func (o *V1GetImportBatchResponse) SetSize(v int32) {
|
||||
o.Size = &v
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value if set, zero value otherwise.
|
||||
func (o *V1GetImportBatchResponse) GetPage() int32 {
|
||||
if o == nil || o.Page == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Page
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportBatchResponse) GetPageOk() (*int32, bool) {
|
||||
if o == nil || o.Page == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Page, true
|
||||
}
|
||||
|
||||
// HasPage returns a boolean if a field has been set.
|
||||
func (o *V1GetImportBatchResponse) HasPage() bool {
|
||||
if o != nil && o.Page != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
||||
func (o *V1GetImportBatchResponse) SetPage(v int32) {
|
||||
o.Page = &v
|
||||
}
|
||||
|
||||
func (o V1GetImportBatchResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Imports != nil {
|
||||
toSerialize["imports"] = o.Imports
|
||||
}
|
||||
if o.Pending != nil {
|
||||
toSerialize["pending"] = o.Pending
|
||||
}
|
||||
if o.Running != nil {
|
||||
toSerialize["running"] = o.Running
|
||||
}
|
||||
if o.Succeeded != nil {
|
||||
toSerialize["succeeded"] = o.Succeeded
|
||||
}
|
||||
if o.Failed != nil {
|
||||
toSerialize["failed"] = o.Failed
|
||||
}
|
||||
if o.Canceled != nil {
|
||||
toSerialize["canceled"] = o.Canceled
|
||||
}
|
||||
if o.Total != nil {
|
||||
toSerialize["total"] = o.Total
|
||||
}
|
||||
if o.Size != nil {
|
||||
toSerialize["size"] = o.Size
|
||||
}
|
||||
if o.Page != nil {
|
||||
toSerialize["page"] = o.Page
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetImportBatchResponse struct {
|
||||
value *V1GetImportBatchResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetImportBatchResponse) Get() *V1GetImportBatchResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetImportBatchResponse) Set(val *V1GetImportBatchResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetImportBatchResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetImportBatchResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetImportBatchResponse(val *V1GetImportBatchResponse) *NullableV1GetImportBatchResponse {
|
||||
return &NullableV1GetImportBatchResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetImportBatchResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetImportBatchResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_import_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_import_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetImportResponse struct for V1GetImportResponse
|
||||
type V1GetImportResponse struct {
|
||||
Import *V1Import `json:"import,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetImportResponse instantiates a new V1GetImportResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetImportResponse() *V1GetImportResponse {
|
||||
this := V1GetImportResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetImportResponseWithDefaults instantiates a new V1GetImportResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetImportResponseWithDefaults() *V1GetImportResponse {
|
||||
this := V1GetImportResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetImport returns the Import field value if set, zero value otherwise.
|
||||
func (o *V1GetImportResponse) GetImport() V1Import {
|
||||
if o == nil || o.Import == nil {
|
||||
var ret V1Import
|
||||
return ret
|
||||
}
|
||||
return *o.Import
|
||||
}
|
||||
|
||||
// GetImportOk returns a tuple with the Import field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetImportResponse) GetImportOk() (*V1Import, bool) {
|
||||
if o == nil || o.Import == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Import, true
|
||||
}
|
||||
|
||||
// HasImport returns a boolean if a field has been set.
|
||||
func (o *V1GetImportResponse) HasImport() bool {
|
||||
if o != nil && o.Import != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImport gets a reference to the given V1Import and assigns it to the Import field.
|
||||
func (o *V1GetImportResponse) SetImport(v V1Import) {
|
||||
o.Import = &v
|
||||
}
|
||||
|
||||
func (o V1GetImportResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Import != nil {
|
||||
toSerialize["import"] = o.Import
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetImportResponse struct {
|
||||
value *V1GetImportResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetImportResponse) Get() *V1GetImportResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetImportResponse) Set(val *V1GetImportResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetImportResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetImportResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetImportResponse(val *V1GetImportResponse) *NullableV1GetImportResponse {
|
||||
return &NullableV1GetImportResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetImportResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetImportResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_package_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_package_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetPackageResponse struct for V1GetPackageResponse
|
||||
type V1GetPackageResponse struct {
|
||||
Package *V1Package `json:"package,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetPackageResponse instantiates a new V1GetPackageResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetPackageResponse() *V1GetPackageResponse {
|
||||
this := V1GetPackageResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetPackageResponseWithDefaults instantiates a new V1GetPackageResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetPackageResponseWithDefaults() *V1GetPackageResponse {
|
||||
this := V1GetPackageResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPackage returns the Package field value if set, zero value otherwise.
|
||||
func (o *V1GetPackageResponse) GetPackage() V1Package {
|
||||
if o == nil || o.Package == nil {
|
||||
var ret V1Package
|
||||
return ret
|
||||
}
|
||||
return *o.Package
|
||||
}
|
||||
|
||||
// GetPackageOk returns a tuple with the Package field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetPackageResponse) GetPackageOk() (*V1Package, bool) {
|
||||
if o == nil || o.Package == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Package, true
|
||||
}
|
||||
|
||||
// HasPackage returns a boolean if a field has been set.
|
||||
func (o *V1GetPackageResponse) HasPackage() bool {
|
||||
if o != nil && o.Package != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackage gets a reference to the given V1Package and assigns it to the Package field.
|
||||
func (o *V1GetPackageResponse) SetPackage(v V1Package) {
|
||||
o.Package = &v
|
||||
}
|
||||
|
||||
func (o V1GetPackageResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Package != nil {
|
||||
toSerialize["package"] = o.Package
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetPackageResponse struct {
|
||||
value *V1GetPackageResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetPackageResponse) Get() *V1GetPackageResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetPackageResponse) Set(val *V1GetPackageResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetPackageResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetPackageResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetPackageResponse(val *V1GetPackageResponse) *NullableV1GetPackageResponse {
|
||||
return &NullableV1GetPackageResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetPackageResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetPackageResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_project_credentials_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_project_credentials_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetProjectCredentialsResponse struct for V1GetProjectCredentialsResponse
|
||||
type V1GetProjectCredentialsResponse struct {
|
||||
GitlabUsername *string `json:"gitlabUsername,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetProjectCredentialsResponse instantiates a new V1GetProjectCredentialsResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetProjectCredentialsResponse() *V1GetProjectCredentialsResponse {
|
||||
this := V1GetProjectCredentialsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetProjectCredentialsResponseWithDefaults instantiates a new V1GetProjectCredentialsResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetProjectCredentialsResponseWithDefaults() *V1GetProjectCredentialsResponse {
|
||||
this := V1GetProjectCredentialsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetGitlabUsername returns the GitlabUsername field value if set, zero value otherwise.
|
||||
func (o *V1GetProjectCredentialsResponse) GetGitlabUsername() string {
|
||||
if o == nil || o.GitlabUsername == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.GitlabUsername
|
||||
}
|
||||
|
||||
// GetGitlabUsernameOk returns a tuple with the GitlabUsername field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetProjectCredentialsResponse) GetGitlabUsernameOk() (*string, bool) {
|
||||
if o == nil || o.GitlabUsername == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.GitlabUsername, true
|
||||
}
|
||||
|
||||
// HasGitlabUsername returns a boolean if a field has been set.
|
||||
func (o *V1GetProjectCredentialsResponse) HasGitlabUsername() bool {
|
||||
if o != nil && o.GitlabUsername != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetGitlabUsername gets a reference to the given string and assigns it to the GitlabUsername field.
|
||||
func (o *V1GetProjectCredentialsResponse) SetGitlabUsername(v string) {
|
||||
o.GitlabUsername = &v
|
||||
}
|
||||
|
||||
func (o V1GetProjectCredentialsResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.GitlabUsername != nil {
|
||||
toSerialize["gitlabUsername"] = o.GitlabUsername
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetProjectCredentialsResponse struct {
|
||||
value *V1GetProjectCredentialsResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetProjectCredentialsResponse) Get() *V1GetProjectCredentialsResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetProjectCredentialsResponse) Set(val *V1GetProjectCredentialsResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetProjectCredentialsResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetProjectCredentialsResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetProjectCredentialsResponse(val *V1GetProjectCredentialsResponse) *NullableV1GetProjectCredentialsResponse {
|
||||
return &NullableV1GetProjectCredentialsResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetProjectCredentialsResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetProjectCredentialsResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_project_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_project_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetProjectResponse struct for V1GetProjectResponse
|
||||
type V1GetProjectResponse struct {
|
||||
Project *V1Project `json:"project,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetProjectResponse instantiates a new V1GetProjectResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetProjectResponse() *V1GetProjectResponse {
|
||||
this := V1GetProjectResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetProjectResponseWithDefaults instantiates a new V1GetProjectResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetProjectResponseWithDefaults() *V1GetProjectResponse {
|
||||
this := V1GetProjectResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProject returns the Project field value if set, zero value otherwise.
|
||||
func (o *V1GetProjectResponse) GetProject() V1Project {
|
||||
if o == nil || o.Project == nil {
|
||||
var ret V1Project
|
||||
return ret
|
||||
}
|
||||
return *o.Project
|
||||
}
|
||||
|
||||
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetProjectResponse) GetProjectOk() (*V1Project, bool) {
|
||||
if o == nil || o.Project == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Project, true
|
||||
}
|
||||
|
||||
// HasProject returns a boolean if a field has been set.
|
||||
func (o *V1GetProjectResponse) HasProject() bool {
|
||||
if o != nil && o.Project != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProject gets a reference to the given V1Project and assigns it to the Project field.
|
||||
func (o *V1GetProjectResponse) SetProject(v V1Project) {
|
||||
o.Project = &v
|
||||
}
|
||||
|
||||
func (o V1GetProjectResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Project != nil {
|
||||
toSerialize["project"] = o.Project
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetProjectResponse struct {
|
||||
value *V1GetProjectResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetProjectResponse) Get() *V1GetProjectResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetProjectResponse) Set(val *V1GetProjectResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetProjectResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetProjectResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetProjectResponse(val *V1GetProjectResponse) *NullableV1GetProjectResponse {
|
||||
return &NullableV1GetProjectResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetProjectResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetProjectResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_repository_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_repository_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetRepositoryResponse struct for V1GetRepositoryResponse
|
||||
type V1GetRepositoryResponse struct {
|
||||
Repository *V1Repository `json:"repository,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetRepositoryResponse instantiates a new V1GetRepositoryResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetRepositoryResponse() *V1GetRepositoryResponse {
|
||||
this := V1GetRepositoryResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetRepositoryResponseWithDefaults instantiates a new V1GetRepositoryResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetRepositoryResponseWithDefaults() *V1GetRepositoryResponse {
|
||||
this := V1GetRepositoryResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetRepository returns the Repository field value if set, zero value otherwise.
|
||||
func (o *V1GetRepositoryResponse) GetRepository() V1Repository {
|
||||
if o == nil || o.Repository == nil {
|
||||
var ret V1Repository
|
||||
return ret
|
||||
}
|
||||
return *o.Repository
|
||||
}
|
||||
|
||||
// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetRepositoryResponse) GetRepositoryOk() (*V1Repository, bool) {
|
||||
if o == nil || o.Repository == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Repository, true
|
||||
}
|
||||
|
||||
// HasRepository returns a boolean if a field has been set.
|
||||
func (o *V1GetRepositoryResponse) HasRepository() bool {
|
||||
if o != nil && o.Repository != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRepository gets a reference to the given V1Repository and assigns it to the Repository field.
|
||||
func (o *V1GetRepositoryResponse) SetRepository(v V1Repository) {
|
||||
o.Repository = &v
|
||||
}
|
||||
|
||||
func (o V1GetRepositoryResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Repository != nil {
|
||||
toSerialize["repository"] = o.Repository
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetRepositoryResponse struct {
|
||||
value *V1GetRepositoryResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetRepositoryResponse) Get() *V1GetRepositoryResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetRepositoryResponse) Set(val *V1GetRepositoryResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetRepositoryResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetRepositoryResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetRepositoryResponse(val *V1GetRepositoryResponse) *NullableV1GetRepositoryResponse {
|
||||
return &NullableV1GetRepositoryResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetRepositoryResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetRepositoryResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_task_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_get_task_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1GetTaskResponse struct for V1GetTaskResponse
|
||||
type V1GetTaskResponse struct {
|
||||
Task *V1AsyncTask `json:"task,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1GetTaskResponse instantiates a new V1GetTaskResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1GetTaskResponse() *V1GetTaskResponse {
|
||||
this := V1GetTaskResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1GetTaskResponseWithDefaults instantiates a new V1GetTaskResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1GetTaskResponseWithDefaults() *V1GetTaskResponse {
|
||||
this := V1GetTaskResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetTask returns the Task field value if set, zero value otherwise.
|
||||
func (o *V1GetTaskResponse) GetTask() V1AsyncTask {
|
||||
if o == nil || o.Task == nil {
|
||||
var ret V1AsyncTask
|
||||
return ret
|
||||
}
|
||||
return *o.Task
|
||||
}
|
||||
|
||||
// GetTaskOk returns a tuple with the Task field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1GetTaskResponse) GetTaskOk() (*V1AsyncTask, bool) {
|
||||
if o == nil || o.Task == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Task, true
|
||||
}
|
||||
|
||||
// HasTask returns a boolean if a field has been set.
|
||||
func (o *V1GetTaskResponse) HasTask() bool {
|
||||
if o != nil && o.Task != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTask gets a reference to the given V1AsyncTask and assigns it to the Task field.
|
||||
func (o *V1GetTaskResponse) SetTask(v V1AsyncTask) {
|
||||
o.Task = &v
|
||||
}
|
||||
|
||||
func (o V1GetTaskResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Task != nil {
|
||||
toSerialize["task"] = o.Task
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1GetTaskResponse struct {
|
||||
value *V1GetTaskResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1GetTaskResponse) Get() *V1GetTaskResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1GetTaskResponse) Set(val *V1GetTaskResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1GetTaskResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1GetTaskResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1GetTaskResponse(val *V1GetTaskResponse) *NullableV1GetTaskResponse {
|
||||
return &NullableV1GetTaskResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1GetTaskResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1GetTaskResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
300
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import.go
generated
vendored
Normal file
300
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import.go
generated
vendored
Normal file
@ -0,0 +1,300 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// V1Import struct for V1Import
|
||||
type V1Import struct {
|
||||
Id *string `json:"id,omitempty"`
|
||||
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
TaskId *string `json:"taskId,omitempty"`
|
||||
Status *V1TaskStatus `json:"status,omitempty"`
|
||||
Revisions *[]V1ImportRevision `json:"revisions,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1Import instantiates a new V1Import object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1Import() *V1Import {
|
||||
this := V1Import{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ImportWithDefaults instantiates a new V1Import object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ImportWithDefaults() *V1Import {
|
||||
this := V1Import{}
|
||||
var status V1TaskStatus = UNSPECIFIED
|
||||
this.Status = &status
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *V1Import) GetId() string {
|
||||
if o == nil || o.Id == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Import) GetIdOk() (*string, bool) {
|
||||
if o == nil || o.Id == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *V1Import) HasId() bool {
|
||||
if o != nil && o.Id != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *V1Import) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *V1Import) GetCreatedAt() time.Time {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Import) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *V1Import) HasCreatedAt() bool {
|
||||
if o != nil && o.CreatedAt != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *V1Import) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *V1Import) GetName() string {
|
||||
if o == nil || o.Name == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Name
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Import) GetNameOk() (*string, bool) {
|
||||
if o == nil || o.Name == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Name, true
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *V1Import) HasName() bool {
|
||||
if o != nil && o.Name != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *V1Import) SetName(v string) {
|
||||
o.Name = &v
|
||||
}
|
||||
|
||||
// GetTaskId returns the TaskId field value if set, zero value otherwise.
|
||||
func (o *V1Import) GetTaskId() string {
|
||||
if o == nil || o.TaskId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.TaskId
|
||||
}
|
||||
|
||||
// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Import) GetTaskIdOk() (*string, bool) {
|
||||
if o == nil || o.TaskId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.TaskId, true
|
||||
}
|
||||
|
||||
// HasTaskId returns a boolean if a field has been set.
|
||||
func (o *V1Import) HasTaskId() bool {
|
||||
if o != nil && o.TaskId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTaskId gets a reference to the given string and assigns it to the TaskId field.
|
||||
func (o *V1Import) SetTaskId(v string) {
|
||||
o.TaskId = &v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *V1Import) GetStatus() V1TaskStatus {
|
||||
if o == nil || o.Status == nil {
|
||||
var ret V1TaskStatus
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Import) GetStatusOk() (*V1TaskStatus, bool) {
|
||||
if o == nil || o.Status == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *V1Import) HasStatus() bool {
|
||||
if o != nil && o.Status != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given V1TaskStatus and assigns it to the Status field.
|
||||
func (o *V1Import) SetStatus(v V1TaskStatus) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
// GetRevisions returns the Revisions field value if set, zero value otherwise.
|
||||
func (o *V1Import) GetRevisions() []V1ImportRevision {
|
||||
if o == nil || o.Revisions == nil {
|
||||
var ret []V1ImportRevision
|
||||
return ret
|
||||
}
|
||||
return *o.Revisions
|
||||
}
|
||||
|
||||
// GetRevisionsOk returns a tuple with the Revisions field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1Import) GetRevisionsOk() (*[]V1ImportRevision, bool) {
|
||||
if o == nil || o.Revisions == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Revisions, true
|
||||
}
|
||||
|
||||
// HasRevisions returns a boolean if a field has been set.
|
||||
func (o *V1Import) HasRevisions() bool {
|
||||
if o != nil && o.Revisions != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRevisions gets a reference to the given []V1ImportRevision and assigns it to the Revisions field.
|
||||
func (o *V1Import) SetRevisions(v []V1ImportRevision) {
|
||||
o.Revisions = &v
|
||||
}
|
||||
|
||||
func (o V1Import) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Id != nil {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if o.CreatedAt != nil {
|
||||
toSerialize["createdAt"] = o.CreatedAt
|
||||
}
|
||||
if o.Name != nil {
|
||||
toSerialize["name"] = o.Name
|
||||
}
|
||||
if o.TaskId != nil {
|
||||
toSerialize["taskId"] = o.TaskId
|
||||
}
|
||||
if o.Status != nil {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
if o.Revisions != nil {
|
||||
toSerialize["revisions"] = o.Revisions
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1Import struct {
|
||||
value *V1Import
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1Import) Get() *V1Import {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1Import) Set(val *V1Import) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1Import) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1Import) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1Import(val *V1Import) *NullableV1Import {
|
||||
return &NullableV1Import{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1Import) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1Import) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
368
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_batch.go
generated
vendored
Normal file
368
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_batch.go
generated
vendored
Normal file
@ -0,0 +1,368 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// V1ImportBatch struct for V1ImportBatch
|
||||
type V1ImportBatch struct {
|
||||
Id *string `json:"id,omitempty"`
|
||||
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
||||
Count *int32 `json:"count,omitempty"`
|
||||
Pending *int32 `json:"pending,omitempty"`
|
||||
Running *int32 `json:"running,omitempty"`
|
||||
Succeeded *int32 `json:"succeeded,omitempty"`
|
||||
Failed *int32 `json:"failed,omitempty"`
|
||||
Canceled *int32 `json:"canceled,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ImportBatch instantiates a new V1ImportBatch object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ImportBatch() *V1ImportBatch {
|
||||
this := V1ImportBatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ImportBatchWithDefaults instantiates a new V1ImportBatch object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ImportBatchWithDefaults() *V1ImportBatch {
|
||||
this := V1ImportBatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetId() string {
|
||||
if o == nil || o.Id == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetIdOk() (*string, bool) {
|
||||
if o == nil || o.Id == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasId() bool {
|
||||
if o != nil && o.Id != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *V1ImportBatch) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetCreatedAt() time.Time {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
var ret time.Time
|
||||
return ret
|
||||
}
|
||||
return *o.CreatedAt
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetCreatedAtOk() (*time.Time, bool) {
|
||||
if o == nil || o.CreatedAt == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.CreatedAt, true
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasCreatedAt() bool {
|
||||
if o != nil && o.CreatedAt != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *V1ImportBatch) SetCreatedAt(v time.Time) {
|
||||
o.CreatedAt = &v
|
||||
}
|
||||
|
||||
// GetCount returns the Count field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetCount() int32 {
|
||||
if o == nil || o.Count == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Count
|
||||
}
|
||||
|
||||
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetCountOk() (*int32, bool) {
|
||||
if o == nil || o.Count == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Count, true
|
||||
}
|
||||
|
||||
// HasCount returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasCount() bool {
|
||||
if o != nil && o.Count != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCount gets a reference to the given int32 and assigns it to the Count field.
|
||||
func (o *V1ImportBatch) SetCount(v int32) {
|
||||
o.Count = &v
|
||||
}
|
||||
|
||||
// GetPending returns the Pending field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetPending() int32 {
|
||||
if o == nil || o.Pending == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Pending
|
||||
}
|
||||
|
||||
// GetPendingOk returns a tuple with the Pending field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetPendingOk() (*int32, bool) {
|
||||
if o == nil || o.Pending == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Pending, true
|
||||
}
|
||||
|
||||
// HasPending returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasPending() bool {
|
||||
if o != nil && o.Pending != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPending gets a reference to the given int32 and assigns it to the Pending field.
|
||||
func (o *V1ImportBatch) SetPending(v int32) {
|
||||
o.Pending = &v
|
||||
}
|
||||
|
||||
// GetRunning returns the Running field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetRunning() int32 {
|
||||
if o == nil || o.Running == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Running
|
||||
}
|
||||
|
||||
// GetRunningOk returns a tuple with the Running field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetRunningOk() (*int32, bool) {
|
||||
if o == nil || o.Running == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Running, true
|
||||
}
|
||||
|
||||
// HasRunning returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasRunning() bool {
|
||||
if o != nil && o.Running != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRunning gets a reference to the given int32 and assigns it to the Running field.
|
||||
func (o *V1ImportBatch) SetRunning(v int32) {
|
||||
o.Running = &v
|
||||
}
|
||||
|
||||
// GetSucceeded returns the Succeeded field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetSucceeded() int32 {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Succeeded
|
||||
}
|
||||
|
||||
// GetSucceededOk returns a tuple with the Succeeded field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetSucceededOk() (*int32, bool) {
|
||||
if o == nil || o.Succeeded == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Succeeded, true
|
||||
}
|
||||
|
||||
// HasSucceeded returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasSucceeded() bool {
|
||||
if o != nil && o.Succeeded != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSucceeded gets a reference to the given int32 and assigns it to the Succeeded field.
|
||||
func (o *V1ImportBatch) SetSucceeded(v int32) {
|
||||
o.Succeeded = &v
|
||||
}
|
||||
|
||||
// GetFailed returns the Failed field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetFailed() int32 {
|
||||
if o == nil || o.Failed == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Failed
|
||||
}
|
||||
|
||||
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetFailedOk() (*int32, bool) {
|
||||
if o == nil || o.Failed == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Failed, true
|
||||
}
|
||||
|
||||
// HasFailed returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasFailed() bool {
|
||||
if o != nil && o.Failed != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetFailed gets a reference to the given int32 and assigns it to the Failed field.
|
||||
func (o *V1ImportBatch) SetFailed(v int32) {
|
||||
o.Failed = &v
|
||||
}
|
||||
|
||||
// GetCanceled returns the Canceled field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatch) GetCanceled() int32 {
|
||||
if o == nil || o.Canceled == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Canceled
|
||||
}
|
||||
|
||||
// GetCanceledOk returns a tuple with the Canceled field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatch) GetCanceledOk() (*int32, bool) {
|
||||
if o == nil || o.Canceled == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Canceled, true
|
||||
}
|
||||
|
||||
// HasCanceled returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatch) HasCanceled() bool {
|
||||
if o != nil && o.Canceled != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCanceled gets a reference to the given int32 and assigns it to the Canceled field.
|
||||
func (o *V1ImportBatch) SetCanceled(v int32) {
|
||||
o.Canceled = &v
|
||||
}
|
||||
|
||||
func (o V1ImportBatch) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Id != nil {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if o.CreatedAt != nil {
|
||||
toSerialize["createdAt"] = o.CreatedAt
|
||||
}
|
||||
if o.Count != nil {
|
||||
toSerialize["count"] = o.Count
|
||||
}
|
||||
if o.Pending != nil {
|
||||
toSerialize["pending"] = o.Pending
|
||||
}
|
||||
if o.Running != nil {
|
||||
toSerialize["running"] = o.Running
|
||||
}
|
||||
if o.Succeeded != nil {
|
||||
toSerialize["succeeded"] = o.Succeeded
|
||||
}
|
||||
if o.Failed != nil {
|
||||
toSerialize["failed"] = o.Failed
|
||||
}
|
||||
if o.Canceled != nil {
|
||||
toSerialize["canceled"] = o.Canceled
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ImportBatch struct {
|
||||
value *V1ImportBatch
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ImportBatch) Get() *V1ImportBatch {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportBatch) Set(val *V1ImportBatch) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ImportBatch) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportBatch) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ImportBatch(val *V1ImportBatch) *NullableV1ImportBatch {
|
||||
return &NullableV1ImportBatch{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ImportBatch) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportBatch) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_batch_retry_failed_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_batch_retry_failed_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ImportBatchRetryFailedResponse struct for V1ImportBatchRetryFailedResponse
|
||||
type V1ImportBatchRetryFailedResponse struct {
|
||||
ImportBatchId *string `json:"importBatchId,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ImportBatchRetryFailedResponse instantiates a new V1ImportBatchRetryFailedResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ImportBatchRetryFailedResponse() *V1ImportBatchRetryFailedResponse {
|
||||
this := V1ImportBatchRetryFailedResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ImportBatchRetryFailedResponseWithDefaults instantiates a new V1ImportBatchRetryFailedResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ImportBatchRetryFailedResponseWithDefaults() *V1ImportBatchRetryFailedResponse {
|
||||
this := V1ImportBatchRetryFailedResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetImportBatchId returns the ImportBatchId field value if set, zero value otherwise.
|
||||
func (o *V1ImportBatchRetryFailedResponse) GetImportBatchId() string {
|
||||
if o == nil || o.ImportBatchId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ImportBatchId
|
||||
}
|
||||
|
||||
// GetImportBatchIdOk returns a tuple with the ImportBatchId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportBatchRetryFailedResponse) GetImportBatchIdOk() (*string, bool) {
|
||||
if o == nil || o.ImportBatchId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ImportBatchId, true
|
||||
}
|
||||
|
||||
// HasImportBatchId returns a boolean if a field has been set.
|
||||
func (o *V1ImportBatchRetryFailedResponse) HasImportBatchId() bool {
|
||||
if o != nil && o.ImportBatchId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImportBatchId gets a reference to the given string and assigns it to the ImportBatchId field.
|
||||
func (o *V1ImportBatchRetryFailedResponse) SetImportBatchId(v string) {
|
||||
o.ImportBatchId = &v
|
||||
}
|
||||
|
||||
func (o V1ImportBatchRetryFailedResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.ImportBatchId != nil {
|
||||
toSerialize["importBatchId"] = o.ImportBatchId
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ImportBatchRetryFailedResponse struct {
|
||||
value *V1ImportBatchRetryFailedResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ImportBatchRetryFailedResponse) Get() *V1ImportBatchRetryFailedResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportBatchRetryFailedResponse) Set(val *V1ImportBatchRetryFailedResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ImportBatchRetryFailedResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportBatchRetryFailedResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ImportBatchRetryFailedResponse(val *V1ImportBatchRetryFailedResponse) *NullableV1ImportBatchRetryFailedResponse {
|
||||
return &NullableV1ImportBatchRetryFailedResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ImportBatchRetryFailedResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportBatchRetryFailedResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_package_batch_response.go
generated
vendored
Normal file
115
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_package_batch_response.go
generated
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ImportPackageBatchResponse struct for V1ImportPackageBatchResponse
|
||||
type V1ImportPackageBatchResponse struct {
|
||||
ImportBatchId *string `json:"importBatchId,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ImportPackageBatchResponse instantiates a new V1ImportPackageBatchResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ImportPackageBatchResponse() *V1ImportPackageBatchResponse {
|
||||
this := V1ImportPackageBatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ImportPackageBatchResponseWithDefaults instantiates a new V1ImportPackageBatchResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ImportPackageBatchResponseWithDefaults() *V1ImportPackageBatchResponse {
|
||||
this := V1ImportPackageBatchResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetImportBatchId returns the ImportBatchId field value if set, zero value otherwise.
|
||||
func (o *V1ImportPackageBatchResponse) GetImportBatchId() string {
|
||||
if o == nil || o.ImportBatchId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ImportBatchId
|
||||
}
|
||||
|
||||
// GetImportBatchIdOk returns a tuple with the ImportBatchId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportPackageBatchResponse) GetImportBatchIdOk() (*string, bool) {
|
||||
if o == nil || o.ImportBatchId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ImportBatchId, true
|
||||
}
|
||||
|
||||
// HasImportBatchId returns a boolean if a field has been set.
|
||||
func (o *V1ImportPackageBatchResponse) HasImportBatchId() bool {
|
||||
if o != nil && o.ImportBatchId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImportBatchId gets a reference to the given string and assigns it to the ImportBatchId field.
|
||||
func (o *V1ImportPackageBatchResponse) SetImportBatchId(v string) {
|
||||
o.ImportBatchId = &v
|
||||
}
|
||||
|
||||
func (o V1ImportPackageBatchResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.ImportBatchId != nil {
|
||||
toSerialize["importBatchId"] = o.ImportBatchId
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ImportPackageBatchResponse struct {
|
||||
value *V1ImportPackageBatchResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ImportPackageBatchResponse) Get() *V1ImportPackageBatchResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportPackageBatchResponse) Set(val *V1ImportPackageBatchResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ImportPackageBatchResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportPackageBatchResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ImportPackageBatchResponse(val *V1ImportPackageBatchResponse) *NullableV1ImportPackageBatchResponse {
|
||||
return &NullableV1ImportPackageBatchResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ImportPackageBatchResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportPackageBatchResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
260
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_package_request.go
generated
vendored
Normal file
260
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_package_request.go
generated
vendored
Normal file
@ -0,0 +1,260 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ImportPackageRequest struct for V1ImportPackageRequest
|
||||
type V1ImportPackageRequest struct {
|
||||
// Project ID that we want this import to be assigned to All import requests need a project id, however after the initial import, sharing the VRE in an inter-project way is possible.
|
||||
ProjectId *string `json:"projectId,omitempty"`
|
||||
PackageName *string `json:"packageName,omitempty"`
|
||||
PackageId *string `json:"packageId,omitempty"`
|
||||
Vre *V1VersionRelease `json:"vre,omitempty"`
|
||||
SetInactive *bool `json:"setInactive,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ImportPackageRequest instantiates a new V1ImportPackageRequest object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ImportPackageRequest() *V1ImportPackageRequest {
|
||||
this := V1ImportPackageRequest{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ImportPackageRequestWithDefaults instantiates a new V1ImportPackageRequest object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ImportPackageRequestWithDefaults() *V1ImportPackageRequest {
|
||||
this := V1ImportPackageRequest{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProjectId returns the ProjectId field value if set, zero value otherwise.
|
||||
func (o *V1ImportPackageRequest) GetProjectId() string {
|
||||
if o == nil || o.ProjectId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ProjectId
|
||||
}
|
||||
|
||||
// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportPackageRequest) GetProjectIdOk() (*string, bool) {
|
||||
if o == nil || o.ProjectId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ProjectId, true
|
||||
}
|
||||
|
||||
// HasProjectId returns a boolean if a field has been set.
|
||||
func (o *V1ImportPackageRequest) HasProjectId() bool {
|
||||
if o != nil && o.ProjectId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetProjectId gets a reference to the given string and assigns it to the ProjectId field.
|
||||
func (o *V1ImportPackageRequest) SetProjectId(v string) {
|
||||
o.ProjectId = &v
|
||||
}
|
||||
|
||||
// GetPackageName returns the PackageName field value if set, zero value otherwise.
|
||||
func (o *V1ImportPackageRequest) GetPackageName() string {
|
||||
if o == nil || o.PackageName == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PackageName
|
||||
}
|
||||
|
||||
// GetPackageNameOk returns a tuple with the PackageName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportPackageRequest) GetPackageNameOk() (*string, bool) {
|
||||
if o == nil || o.PackageName == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.PackageName, true
|
||||
}
|
||||
|
||||
// HasPackageName returns a boolean if a field has been set.
|
||||
func (o *V1ImportPackageRequest) HasPackageName() bool {
|
||||
if o != nil && o.PackageName != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackageName gets a reference to the given string and assigns it to the PackageName field.
|
||||
func (o *V1ImportPackageRequest) SetPackageName(v string) {
|
||||
o.PackageName = &v
|
||||
}
|
||||
|
||||
// GetPackageId returns the PackageId field value if set, zero value otherwise.
|
||||
func (o *V1ImportPackageRequest) GetPackageId() string {
|
||||
if o == nil || o.PackageId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PackageId
|
||||
}
|
||||
|
||||
// GetPackageIdOk returns a tuple with the PackageId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportPackageRequest) GetPackageIdOk() (*string, bool) {
|
||||
if o == nil || o.PackageId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.PackageId, true
|
||||
}
|
||||
|
||||
// HasPackageId returns a boolean if a field has been set.
|
||||
func (o *V1ImportPackageRequest) HasPackageId() bool {
|
||||
if o != nil && o.PackageId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackageId gets a reference to the given string and assigns it to the PackageId field.
|
||||
func (o *V1ImportPackageRequest) SetPackageId(v string) {
|
||||
o.PackageId = &v
|
||||
}
|
||||
|
||||
// GetVre returns the Vre field value if set, zero value otherwise.
|
||||
func (o *V1ImportPackageRequest) GetVre() V1VersionRelease {
|
||||
if o == nil || o.Vre == nil {
|
||||
var ret V1VersionRelease
|
||||
return ret
|
||||
}
|
||||
return *o.Vre
|
||||
}
|
||||
|
||||
// GetVreOk returns a tuple with the Vre field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportPackageRequest) GetVreOk() (*V1VersionRelease, bool) {
|
||||
if o == nil || o.Vre == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Vre, true
|
||||
}
|
||||
|
||||
// HasVre returns a boolean if a field has been set.
|
||||
func (o *V1ImportPackageRequest) HasVre() bool {
|
||||
if o != nil && o.Vre != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVre gets a reference to the given V1VersionRelease and assigns it to the Vre field.
|
||||
func (o *V1ImportPackageRequest) SetVre(v V1VersionRelease) {
|
||||
o.Vre = &v
|
||||
}
|
||||
|
||||
// GetSetInactive returns the SetInactive field value if set, zero value otherwise.
|
||||
func (o *V1ImportPackageRequest) GetSetInactive() bool {
|
||||
if o == nil || o.SetInactive == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.SetInactive
|
||||
}
|
||||
|
||||
// GetSetInactiveOk returns a tuple with the SetInactive field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportPackageRequest) GetSetInactiveOk() (*bool, bool) {
|
||||
if o == nil || o.SetInactive == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SetInactive, true
|
||||
}
|
||||
|
||||
// HasSetInactive returns a boolean if a field has been set.
|
||||
func (o *V1ImportPackageRequest) HasSetInactive() bool {
|
||||
if o != nil && o.SetInactive != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSetInactive gets a reference to the given bool and assigns it to the SetInactive field.
|
||||
func (o *V1ImportPackageRequest) SetSetInactive(v bool) {
|
||||
o.SetInactive = &v
|
||||
}
|
||||
|
||||
func (o V1ImportPackageRequest) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.ProjectId != nil {
|
||||
toSerialize["projectId"] = o.ProjectId
|
||||
}
|
||||
if o.PackageName != nil {
|
||||
toSerialize["packageName"] = o.PackageName
|
||||
}
|
||||
if o.PackageId != nil {
|
||||
toSerialize["packageId"] = o.PackageId
|
||||
}
|
||||
if o.Vre != nil {
|
||||
toSerialize["vre"] = o.Vre
|
||||
}
|
||||
if o.SetInactive != nil {
|
||||
toSerialize["setInactive"] = o.SetInactive
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ImportPackageRequest struct {
|
||||
value *V1ImportPackageRequest
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ImportPackageRequest) Get() *V1ImportPackageRequest {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportPackageRequest) Set(val *V1ImportPackageRequest) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ImportPackageRequest) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportPackageRequest) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ImportPackageRequest(val *V1ImportPackageRequest) *NullableV1ImportPackageRequest {
|
||||
return &NullableV1ImportPackageRequest{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ImportPackageRequest) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportPackageRequest) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
331
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_revision.go
generated
vendored
Normal file
331
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_import_revision.go
generated
vendored
Normal file
@ -0,0 +1,331 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ImportRevision ImportRevision is SCM metadata as well as versioning information of a specific import element.
|
||||
type V1ImportRevision struct {
|
||||
ScmHash *string `json:"scmHash,omitempty"`
|
||||
ScmBranchName *string `json:"scmBranchName,omitempty"`
|
||||
Vre *V1VersionRelease `json:"vre,omitempty"`
|
||||
Module *bool `json:"module,omitempty"`
|
||||
ModuleStream *bool `json:"moduleStream,omitempty"`
|
||||
ScmUrl *string `json:"scmUrl,omitempty"`
|
||||
PackageVersionId *string `json:"packageVersionId,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ImportRevision instantiates a new V1ImportRevision object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ImportRevision() *V1ImportRevision {
|
||||
this := V1ImportRevision{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ImportRevisionWithDefaults instantiates a new V1ImportRevision object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ImportRevisionWithDefaults() *V1ImportRevision {
|
||||
this := V1ImportRevision{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetScmHash returns the ScmHash field value if set, zero value otherwise.
|
||||
func (o *V1ImportRevision) GetScmHash() string {
|
||||
if o == nil || o.ScmHash == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ScmHash
|
||||
}
|
||||
|
||||
// GetScmHashOk returns a tuple with the ScmHash field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportRevision) GetScmHashOk() (*string, bool) {
|
||||
if o == nil || o.ScmHash == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ScmHash, true
|
||||
}
|
||||
|
||||
// HasScmHash returns a boolean if a field has been set.
|
||||
func (o *V1ImportRevision) HasScmHash() bool {
|
||||
if o != nil && o.ScmHash != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetScmHash gets a reference to the given string and assigns it to the ScmHash field.
|
||||
func (o *V1ImportRevision) SetScmHash(v string) {
|
||||
o.ScmHash = &v
|
||||
}
|
||||
|
||||
// GetScmBranchName returns the ScmBranchName field value if set, zero value otherwise.
|
||||
func (o *V1ImportRevision) GetScmBranchName() string {
|
||||
if o == nil || o.ScmBranchName == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ScmBranchName
|
||||
}
|
||||
|
||||
// GetScmBranchNameOk returns a tuple with the ScmBranchName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportRevision) GetScmBranchNameOk() (*string, bool) {
|
||||
if o == nil || o.ScmBranchName == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ScmBranchName, true
|
||||
}
|
||||
|
||||
// HasScmBranchName returns a boolean if a field has been set.
|
||||
func (o *V1ImportRevision) HasScmBranchName() bool {
|
||||
if o != nil && o.ScmBranchName != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetScmBranchName gets a reference to the given string and assigns it to the ScmBranchName field.
|
||||
func (o *V1ImportRevision) SetScmBranchName(v string) {
|
||||
o.ScmBranchName = &v
|
||||
}
|
||||
|
||||
// GetVre returns the Vre field value if set, zero value otherwise.
|
||||
func (o *V1ImportRevision) GetVre() V1VersionRelease {
|
||||
if o == nil || o.Vre == nil {
|
||||
var ret V1VersionRelease
|
||||
return ret
|
||||
}
|
||||
return *o.Vre
|
||||
}
|
||||
|
||||
// GetVreOk returns a tuple with the Vre field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportRevision) GetVreOk() (*V1VersionRelease, bool) {
|
||||
if o == nil || o.Vre == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Vre, true
|
||||
}
|
||||
|
||||
// HasVre returns a boolean if a field has been set.
|
||||
func (o *V1ImportRevision) HasVre() bool {
|
||||
if o != nil && o.Vre != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVre gets a reference to the given V1VersionRelease and assigns it to the Vre field.
|
||||
func (o *V1ImportRevision) SetVre(v V1VersionRelease) {
|
||||
o.Vre = &v
|
||||
}
|
||||
|
||||
// GetModule returns the Module field value if set, zero value otherwise.
|
||||
func (o *V1ImportRevision) GetModule() bool {
|
||||
if o == nil || o.Module == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.Module
|
||||
}
|
||||
|
||||
// GetModuleOk returns a tuple with the Module field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportRevision) GetModuleOk() (*bool, bool) {
|
||||
if o == nil || o.Module == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Module, true
|
||||
}
|
||||
|
||||
// HasModule returns a boolean if a field has been set.
|
||||
func (o *V1ImportRevision) HasModule() bool {
|
||||
if o != nil && o.Module != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetModule gets a reference to the given bool and assigns it to the Module field.
|
||||
func (o *V1ImportRevision) SetModule(v bool) {
|
||||
o.Module = &v
|
||||
}
|
||||
|
||||
// GetModuleStream returns the ModuleStream field value if set, zero value otherwise.
|
||||
func (o *V1ImportRevision) GetModuleStream() bool {
|
||||
if o == nil || o.ModuleStream == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.ModuleStream
|
||||
}
|
||||
|
||||
// GetModuleStreamOk returns a tuple with the ModuleStream field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportRevision) GetModuleStreamOk() (*bool, bool) {
|
||||
if o == nil || o.ModuleStream == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ModuleStream, true
|
||||
}
|
||||
|
||||
// HasModuleStream returns a boolean if a field has been set.
|
||||
func (o *V1ImportRevision) HasModuleStream() bool {
|
||||
if o != nil && o.ModuleStream != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetModuleStream gets a reference to the given bool and assigns it to the ModuleStream field.
|
||||
func (o *V1ImportRevision) SetModuleStream(v bool) {
|
||||
o.ModuleStream = &v
|
||||
}
|
||||
|
||||
// GetScmUrl returns the ScmUrl field value if set, zero value otherwise.
|
||||
func (o *V1ImportRevision) GetScmUrl() string {
|
||||
if o == nil || o.ScmUrl == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.ScmUrl
|
||||
}
|
||||
|
||||
// GetScmUrlOk returns a tuple with the ScmUrl field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportRevision) GetScmUrlOk() (*string, bool) {
|
||||
if o == nil || o.ScmUrl == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ScmUrl, true
|
||||
}
|
||||
|
||||
// HasScmUrl returns a boolean if a field has been set.
|
||||
func (o *V1ImportRevision) HasScmUrl() bool {
|
||||
if o != nil && o.ScmUrl != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetScmUrl gets a reference to the given string and assigns it to the ScmUrl field.
|
||||
func (o *V1ImportRevision) SetScmUrl(v string) {
|
||||
o.ScmUrl = &v
|
||||
}
|
||||
|
||||
// GetPackageVersionId returns the PackageVersionId field value if set, zero value otherwise.
|
||||
func (o *V1ImportRevision) GetPackageVersionId() string {
|
||||
if o == nil || o.PackageVersionId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.PackageVersionId
|
||||
}
|
||||
|
||||
// GetPackageVersionIdOk returns a tuple with the PackageVersionId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ImportRevision) GetPackageVersionIdOk() (*string, bool) {
|
||||
if o == nil || o.PackageVersionId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.PackageVersionId, true
|
||||
}
|
||||
|
||||
// HasPackageVersionId returns a boolean if a field has been set.
|
||||
func (o *V1ImportRevision) HasPackageVersionId() bool {
|
||||
if o != nil && o.PackageVersionId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackageVersionId gets a reference to the given string and assigns it to the PackageVersionId field.
|
||||
func (o *V1ImportRevision) SetPackageVersionId(v string) {
|
||||
o.PackageVersionId = &v
|
||||
}
|
||||
|
||||
func (o V1ImportRevision) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.ScmHash != nil {
|
||||
toSerialize["scmHash"] = o.ScmHash
|
||||
}
|
||||
if o.ScmBranchName != nil {
|
||||
toSerialize["scmBranchName"] = o.ScmBranchName
|
||||
}
|
||||
if o.Vre != nil {
|
||||
toSerialize["vre"] = o.Vre
|
||||
}
|
||||
if o.Module != nil {
|
||||
toSerialize["module"] = o.Module
|
||||
}
|
||||
if o.ModuleStream != nil {
|
||||
toSerialize["moduleStream"] = o.ModuleStream
|
||||
}
|
||||
if o.ScmUrl != nil {
|
||||
toSerialize["scmUrl"] = o.ScmUrl
|
||||
}
|
||||
if o.PackageVersionId != nil {
|
||||
toSerialize["packageVersionId"] = o.PackageVersionId
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ImportRevision struct {
|
||||
value *V1ImportRevision
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ImportRevision) Get() *V1ImportRevision {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportRevision) Set(val *V1ImportRevision) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ImportRevision) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportRevision) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ImportRevision(val *V1ImportRevision) *NullableV1ImportRevision {
|
||||
return &NullableV1ImportRevision{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ImportRevision) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ImportRevision) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_build_batches_response.go
generated
vendored
Normal file
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_build_batches_response.go
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ListBuildBatchesResponse struct for V1ListBuildBatchesResponse
|
||||
type V1ListBuildBatchesResponse struct {
|
||||
BuildBatches *[]V1BuildBatch `json:"buildBatches,omitempty"`
|
||||
Total *string `json:"total,omitempty"`
|
||||
Size *int32 `json:"size,omitempty"`
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ListBuildBatchesResponse instantiates a new V1ListBuildBatchesResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ListBuildBatchesResponse() *V1ListBuildBatchesResponse {
|
||||
this := V1ListBuildBatchesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ListBuildBatchesResponseWithDefaults instantiates a new V1ListBuildBatchesResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ListBuildBatchesResponseWithDefaults() *V1ListBuildBatchesResponse {
|
||||
this := V1ListBuildBatchesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBuildBatches returns the BuildBatches field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildBatchesResponse) GetBuildBatches() []V1BuildBatch {
|
||||
if o == nil || o.BuildBatches == nil {
|
||||
var ret []V1BuildBatch
|
||||
return ret
|
||||
}
|
||||
return *o.BuildBatches
|
||||
}
|
||||
|
||||
// GetBuildBatchesOk returns a tuple with the BuildBatches field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildBatchesResponse) GetBuildBatchesOk() (*[]V1BuildBatch, bool) {
|
||||
if o == nil || o.BuildBatches == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.BuildBatches, true
|
||||
}
|
||||
|
||||
// HasBuildBatches returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildBatchesResponse) HasBuildBatches() bool {
|
||||
if o != nil && o.BuildBatches != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBuildBatches gets a reference to the given []V1BuildBatch and assigns it to the BuildBatches field.
|
||||
func (o *V1ListBuildBatchesResponse) SetBuildBatches(v []V1BuildBatch) {
|
||||
o.BuildBatches = &v
|
||||
}
|
||||
|
||||
// GetTotal returns the Total field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildBatchesResponse) GetTotal() string {
|
||||
if o == nil || o.Total == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Total
|
||||
}
|
||||
|
||||
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildBatchesResponse) GetTotalOk() (*string, bool) {
|
||||
if o == nil || o.Total == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Total, true
|
||||
}
|
||||
|
||||
// HasTotal returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildBatchesResponse) HasTotal() bool {
|
||||
if o != nil && o.Total != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotal gets a reference to the given string and assigns it to the Total field.
|
||||
func (o *V1ListBuildBatchesResponse) SetTotal(v string) {
|
||||
o.Total = &v
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildBatchesResponse) GetSize() int32 {
|
||||
if o == nil || o.Size == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Size
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildBatchesResponse) GetSizeOk() (*int32, bool) {
|
||||
if o == nil || o.Size == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Size, true
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildBatchesResponse) HasSize() bool {
|
||||
if o != nil && o.Size != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
||||
func (o *V1ListBuildBatchesResponse) SetSize(v int32) {
|
||||
o.Size = &v
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildBatchesResponse) GetPage() int32 {
|
||||
if o == nil || o.Page == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Page
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildBatchesResponse) GetPageOk() (*int32, bool) {
|
||||
if o == nil || o.Page == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Page, true
|
||||
}
|
||||
|
||||
// HasPage returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildBatchesResponse) HasPage() bool {
|
||||
if o != nil && o.Page != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
||||
func (o *V1ListBuildBatchesResponse) SetPage(v int32) {
|
||||
o.Page = &v
|
||||
}
|
||||
|
||||
func (o V1ListBuildBatchesResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.BuildBatches != nil {
|
||||
toSerialize["buildBatches"] = o.BuildBatches
|
||||
}
|
||||
if o.Total != nil {
|
||||
toSerialize["total"] = o.Total
|
||||
}
|
||||
if o.Size != nil {
|
||||
toSerialize["size"] = o.Size
|
||||
}
|
||||
if o.Page != nil {
|
||||
toSerialize["page"] = o.Page
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ListBuildBatchesResponse struct {
|
||||
value *V1ListBuildBatchesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ListBuildBatchesResponse) Get() *V1ListBuildBatchesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ListBuildBatchesResponse) Set(val *V1ListBuildBatchesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ListBuildBatchesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ListBuildBatchesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ListBuildBatchesResponse(val *V1ListBuildBatchesResponse) *NullableV1ListBuildBatchesResponse {
|
||||
return &NullableV1ListBuildBatchesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ListBuildBatchesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ListBuildBatchesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_builds_response.go
generated
vendored
Normal file
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_builds_response.go
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ListBuildsResponse struct for V1ListBuildsResponse
|
||||
type V1ListBuildsResponse struct {
|
||||
Builds *[]V1Build `json:"builds,omitempty"`
|
||||
Total *string `json:"total,omitempty"`
|
||||
Size *int32 `json:"size,omitempty"`
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ListBuildsResponse instantiates a new V1ListBuildsResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ListBuildsResponse() *V1ListBuildsResponse {
|
||||
this := V1ListBuildsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ListBuildsResponseWithDefaults instantiates a new V1ListBuildsResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ListBuildsResponseWithDefaults() *V1ListBuildsResponse {
|
||||
this := V1ListBuildsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBuilds returns the Builds field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildsResponse) GetBuilds() []V1Build {
|
||||
if o == nil || o.Builds == nil {
|
||||
var ret []V1Build
|
||||
return ret
|
||||
}
|
||||
return *o.Builds
|
||||
}
|
||||
|
||||
// GetBuildsOk returns a tuple with the Builds field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildsResponse) GetBuildsOk() (*[]V1Build, bool) {
|
||||
if o == nil || o.Builds == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Builds, true
|
||||
}
|
||||
|
||||
// HasBuilds returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildsResponse) HasBuilds() bool {
|
||||
if o != nil && o.Builds != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetBuilds gets a reference to the given []V1Build and assigns it to the Builds field.
|
||||
func (o *V1ListBuildsResponse) SetBuilds(v []V1Build) {
|
||||
o.Builds = &v
|
||||
}
|
||||
|
||||
// GetTotal returns the Total field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildsResponse) GetTotal() string {
|
||||
if o == nil || o.Total == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Total
|
||||
}
|
||||
|
||||
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildsResponse) GetTotalOk() (*string, bool) {
|
||||
if o == nil || o.Total == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Total, true
|
||||
}
|
||||
|
||||
// HasTotal returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildsResponse) HasTotal() bool {
|
||||
if o != nil && o.Total != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotal gets a reference to the given string and assigns it to the Total field.
|
||||
func (o *V1ListBuildsResponse) SetTotal(v string) {
|
||||
o.Total = &v
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildsResponse) GetSize() int32 {
|
||||
if o == nil || o.Size == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Size
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildsResponse) GetSizeOk() (*int32, bool) {
|
||||
if o == nil || o.Size == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Size, true
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildsResponse) HasSize() bool {
|
||||
if o != nil && o.Size != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
||||
func (o *V1ListBuildsResponse) SetSize(v int32) {
|
||||
o.Size = &v
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value if set, zero value otherwise.
|
||||
func (o *V1ListBuildsResponse) GetPage() int32 {
|
||||
if o == nil || o.Page == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Page
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListBuildsResponse) GetPageOk() (*int32, bool) {
|
||||
if o == nil || o.Page == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Page, true
|
||||
}
|
||||
|
||||
// HasPage returns a boolean if a field has been set.
|
||||
func (o *V1ListBuildsResponse) HasPage() bool {
|
||||
if o != nil && o.Page != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
||||
func (o *V1ListBuildsResponse) SetPage(v int32) {
|
||||
o.Page = &v
|
||||
}
|
||||
|
||||
func (o V1ListBuildsResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Builds != nil {
|
||||
toSerialize["builds"] = o.Builds
|
||||
}
|
||||
if o.Total != nil {
|
||||
toSerialize["total"] = o.Total
|
||||
}
|
||||
if o.Size != nil {
|
||||
toSerialize["size"] = o.Size
|
||||
}
|
||||
if o.Page != nil {
|
||||
toSerialize["page"] = o.Page
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ListBuildsResponse struct {
|
||||
value *V1ListBuildsResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ListBuildsResponse) Get() *V1ListBuildsResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ListBuildsResponse) Set(val *V1ListBuildsResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ListBuildsResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ListBuildsResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ListBuildsResponse(val *V1ListBuildsResponse) *NullableV1ListBuildsResponse {
|
||||
return &NullableV1ListBuildsResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ListBuildsResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ListBuildsResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_import_batches_response.go
generated
vendored
Normal file
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_import_batches_response.go
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ListImportBatchesResponse struct for V1ListImportBatchesResponse
|
||||
type V1ListImportBatchesResponse struct {
|
||||
ImportBatches *[]V1ImportBatch `json:"importBatches,omitempty"`
|
||||
Total *string `json:"total,omitempty"`
|
||||
Size *int32 `json:"size,omitempty"`
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ListImportBatchesResponse instantiates a new V1ListImportBatchesResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ListImportBatchesResponse() *V1ListImportBatchesResponse {
|
||||
this := V1ListImportBatchesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ListImportBatchesResponseWithDefaults instantiates a new V1ListImportBatchesResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ListImportBatchesResponseWithDefaults() *V1ListImportBatchesResponse {
|
||||
this := V1ListImportBatchesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetImportBatches returns the ImportBatches field value if set, zero value otherwise.
|
||||
func (o *V1ListImportBatchesResponse) GetImportBatches() []V1ImportBatch {
|
||||
if o == nil || o.ImportBatches == nil {
|
||||
var ret []V1ImportBatch
|
||||
return ret
|
||||
}
|
||||
return *o.ImportBatches
|
||||
}
|
||||
|
||||
// GetImportBatchesOk returns a tuple with the ImportBatches field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportBatchesResponse) GetImportBatchesOk() (*[]V1ImportBatch, bool) {
|
||||
if o == nil || o.ImportBatches == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.ImportBatches, true
|
||||
}
|
||||
|
||||
// HasImportBatches returns a boolean if a field has been set.
|
||||
func (o *V1ListImportBatchesResponse) HasImportBatches() bool {
|
||||
if o != nil && o.ImportBatches != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImportBatches gets a reference to the given []V1ImportBatch and assigns it to the ImportBatches field.
|
||||
func (o *V1ListImportBatchesResponse) SetImportBatches(v []V1ImportBatch) {
|
||||
o.ImportBatches = &v
|
||||
}
|
||||
|
||||
// GetTotal returns the Total field value if set, zero value otherwise.
|
||||
func (o *V1ListImportBatchesResponse) GetTotal() string {
|
||||
if o == nil || o.Total == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Total
|
||||
}
|
||||
|
||||
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportBatchesResponse) GetTotalOk() (*string, bool) {
|
||||
if o == nil || o.Total == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Total, true
|
||||
}
|
||||
|
||||
// HasTotal returns a boolean if a field has been set.
|
||||
func (o *V1ListImportBatchesResponse) HasTotal() bool {
|
||||
if o != nil && o.Total != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotal gets a reference to the given string and assigns it to the Total field.
|
||||
func (o *V1ListImportBatchesResponse) SetTotal(v string) {
|
||||
o.Total = &v
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *V1ListImportBatchesResponse) GetSize() int32 {
|
||||
if o == nil || o.Size == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Size
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportBatchesResponse) GetSizeOk() (*int32, bool) {
|
||||
if o == nil || o.Size == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Size, true
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *V1ListImportBatchesResponse) HasSize() bool {
|
||||
if o != nil && o.Size != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
||||
func (o *V1ListImportBatchesResponse) SetSize(v int32) {
|
||||
o.Size = &v
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value if set, zero value otherwise.
|
||||
func (o *V1ListImportBatchesResponse) GetPage() int32 {
|
||||
if o == nil || o.Page == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Page
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportBatchesResponse) GetPageOk() (*int32, bool) {
|
||||
if o == nil || o.Page == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Page, true
|
||||
}
|
||||
|
||||
// HasPage returns a boolean if a field has been set.
|
||||
func (o *V1ListImportBatchesResponse) HasPage() bool {
|
||||
if o != nil && o.Page != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
||||
func (o *V1ListImportBatchesResponse) SetPage(v int32) {
|
||||
o.Page = &v
|
||||
}
|
||||
|
||||
func (o V1ListImportBatchesResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.ImportBatches != nil {
|
||||
toSerialize["importBatches"] = o.ImportBatches
|
||||
}
|
||||
if o.Total != nil {
|
||||
toSerialize["total"] = o.Total
|
||||
}
|
||||
if o.Size != nil {
|
||||
toSerialize["size"] = o.Size
|
||||
}
|
||||
if o.Page != nil {
|
||||
toSerialize["page"] = o.Page
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ListImportBatchesResponse struct {
|
||||
value *V1ListImportBatchesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ListImportBatchesResponse) Get() *V1ListImportBatchesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ListImportBatchesResponse) Set(val *V1ListImportBatchesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ListImportBatchesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ListImportBatchesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ListImportBatchesResponse(val *V1ListImportBatchesResponse) *NullableV1ListImportBatchesResponse {
|
||||
return &NullableV1ListImportBatchesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ListImportBatchesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ListImportBatchesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_imports_response.go
generated
vendored
Normal file
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_imports_response.go
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ListImportsResponse struct for V1ListImportsResponse
|
||||
type V1ListImportsResponse struct {
|
||||
Imports *[]V1Import `json:"imports,omitempty"`
|
||||
Total *string `json:"total,omitempty"`
|
||||
Size *int32 `json:"size,omitempty"`
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ListImportsResponse instantiates a new V1ListImportsResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ListImportsResponse() *V1ListImportsResponse {
|
||||
this := V1ListImportsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ListImportsResponseWithDefaults instantiates a new V1ListImportsResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ListImportsResponseWithDefaults() *V1ListImportsResponse {
|
||||
this := V1ListImportsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetImports returns the Imports field value if set, zero value otherwise.
|
||||
func (o *V1ListImportsResponse) GetImports() []V1Import {
|
||||
if o == nil || o.Imports == nil {
|
||||
var ret []V1Import
|
||||
return ret
|
||||
}
|
||||
return *o.Imports
|
||||
}
|
||||
|
||||
// GetImportsOk returns a tuple with the Imports field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportsResponse) GetImportsOk() (*[]V1Import, bool) {
|
||||
if o == nil || o.Imports == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Imports, true
|
||||
}
|
||||
|
||||
// HasImports returns a boolean if a field has been set.
|
||||
func (o *V1ListImportsResponse) HasImports() bool {
|
||||
if o != nil && o.Imports != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetImports gets a reference to the given []V1Import and assigns it to the Imports field.
|
||||
func (o *V1ListImportsResponse) SetImports(v []V1Import) {
|
||||
o.Imports = &v
|
||||
}
|
||||
|
||||
// GetTotal returns the Total field value if set, zero value otherwise.
|
||||
func (o *V1ListImportsResponse) GetTotal() string {
|
||||
if o == nil || o.Total == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Total
|
||||
}
|
||||
|
||||
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportsResponse) GetTotalOk() (*string, bool) {
|
||||
if o == nil || o.Total == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Total, true
|
||||
}
|
||||
|
||||
// HasTotal returns a boolean if a field has been set.
|
||||
func (o *V1ListImportsResponse) HasTotal() bool {
|
||||
if o != nil && o.Total != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotal gets a reference to the given string and assigns it to the Total field.
|
||||
func (o *V1ListImportsResponse) SetTotal(v string) {
|
||||
o.Total = &v
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *V1ListImportsResponse) GetSize() int32 {
|
||||
if o == nil || o.Size == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Size
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportsResponse) GetSizeOk() (*int32, bool) {
|
||||
if o == nil || o.Size == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Size, true
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *V1ListImportsResponse) HasSize() bool {
|
||||
if o != nil && o.Size != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
||||
func (o *V1ListImportsResponse) SetSize(v int32) {
|
||||
o.Size = &v
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value if set, zero value otherwise.
|
||||
func (o *V1ListImportsResponse) GetPage() int32 {
|
||||
if o == nil || o.Page == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Page
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListImportsResponse) GetPageOk() (*int32, bool) {
|
||||
if o == nil || o.Page == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Page, true
|
||||
}
|
||||
|
||||
// HasPage returns a boolean if a field has been set.
|
||||
func (o *V1ListImportsResponse) HasPage() bool {
|
||||
if o != nil && o.Page != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
||||
func (o *V1ListImportsResponse) SetPage(v int32) {
|
||||
o.Page = &v
|
||||
}
|
||||
|
||||
func (o V1ListImportsResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Imports != nil {
|
||||
toSerialize["imports"] = o.Imports
|
||||
}
|
||||
if o.Total != nil {
|
||||
toSerialize["total"] = o.Total
|
||||
}
|
||||
if o.Size != nil {
|
||||
toSerialize["size"] = o.Size
|
||||
}
|
||||
if o.Page != nil {
|
||||
toSerialize["page"] = o.Page
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ListImportsResponse struct {
|
||||
value *V1ListImportsResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ListImportsResponse) Get() *V1ListImportsResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ListImportsResponse) Set(val *V1ListImportsResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ListImportsResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ListImportsResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ListImportsResponse(val *V1ListImportsResponse) *NullableV1ListImportsResponse {
|
||||
return &NullableV1ListImportsResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ListImportsResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ListImportsResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_packages_response.go
generated
vendored
Normal file
223
vendor/openapi.peridot.resf.org/peridotopenapi/model_v1_list_packages_response.go
generated
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
/*
|
||||
* peridot/proto/v1/batch.proto
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* API version: version not set
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package peridotopenapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// V1ListPackagesResponse struct for V1ListPackagesResponse
|
||||
type V1ListPackagesResponse struct {
|
||||
Packages *[]V1Package `json:"packages,omitempty"`
|
||||
Total *string `json:"total,omitempty"`
|
||||
Size *int32 `json:"size,omitempty"`
|
||||
Page *int32 `json:"page,omitempty"`
|
||||
}
|
||||
|
||||
// NewV1ListPackagesResponse instantiates a new V1ListPackagesResponse object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewV1ListPackagesResponse() *V1ListPackagesResponse {
|
||||
this := V1ListPackagesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewV1ListPackagesResponseWithDefaults instantiates a new V1ListPackagesResponse object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewV1ListPackagesResponseWithDefaults() *V1ListPackagesResponse {
|
||||
this := V1ListPackagesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPackages returns the Packages field value if set, zero value otherwise.
|
||||
func (o *V1ListPackagesResponse) GetPackages() []V1Package {
|
||||
if o == nil || o.Packages == nil {
|
||||
var ret []V1Package
|
||||
return ret
|
||||
}
|
||||
return *o.Packages
|
||||
}
|
||||
|
||||
// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListPackagesResponse) GetPackagesOk() (*[]V1Package, bool) {
|
||||
if o == nil || o.Packages == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Packages, true
|
||||
}
|
||||
|
||||
// HasPackages returns a boolean if a field has been set.
|
||||
func (o *V1ListPackagesResponse) HasPackages() bool {
|
||||
if o != nil && o.Packages != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPackages gets a reference to the given []V1Package and assigns it to the Packages field.
|
||||
func (o *V1ListPackagesResponse) SetPackages(v []V1Package) {
|
||||
o.Packages = &v
|
||||
}
|
||||
|
||||
// GetTotal returns the Total field value if set, zero value otherwise.
|
||||
func (o *V1ListPackagesResponse) GetTotal() string {
|
||||
if o == nil || o.Total == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Total
|
||||
}
|
||||
|
||||
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListPackagesResponse) GetTotalOk() (*string, bool) {
|
||||
if o == nil || o.Total == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Total, true
|
||||
}
|
||||
|
||||
// HasTotal returns a boolean if a field has been set.
|
||||
func (o *V1ListPackagesResponse) HasTotal() bool {
|
||||
if o != nil && o.Total != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTotal gets a reference to the given string and assigns it to the Total field.
|
||||
func (o *V1ListPackagesResponse) SetTotal(v string) {
|
||||
o.Total = &v
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *V1ListPackagesResponse) GetSize() int32 {
|
||||
if o == nil || o.Size == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Size
|
||||
}
|
||||
|
||||
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListPackagesResponse) GetSizeOk() (*int32, bool) {
|
||||
if o == nil || o.Size == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Size, true
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *V1ListPackagesResponse) HasSize() bool {
|
||||
if o != nil && o.Size != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int32 and assigns it to the Size field.
|
||||
func (o *V1ListPackagesResponse) SetSize(v int32) {
|
||||
o.Size = &v
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value if set, zero value otherwise.
|
||||
func (o *V1ListPackagesResponse) GetPage() int32 {
|
||||
if o == nil || o.Page == nil {
|
||||
var ret int32
|
||||
return ret
|
||||
}
|
||||
return *o.Page
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *V1ListPackagesResponse) GetPageOk() (*int32, bool) {
|
||||
if o == nil || o.Page == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Page, true
|
||||
}
|
||||
|
||||
// HasPage returns a boolean if a field has been set.
|
||||
func (o *V1ListPackagesResponse) HasPage() bool {
|
||||
if o != nil && o.Page != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetPage gets a reference to the given int32 and assigns it to the Page field.
|
||||
func (o *V1ListPackagesResponse) SetPage(v int32) {
|
||||
o.Page = &v
|
||||
}
|
||||
|
||||
func (o V1ListPackagesResponse) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Packages != nil {
|
||||
toSerialize["packages"] = o.Packages
|
||||
}
|
||||
if o.Total != nil {
|
||||
toSerialize["total"] = o.Total
|
||||
}
|
||||
if o.Size != nil {
|
||||
toSerialize["size"] = o.Size
|
||||
}
|
||||
if o.Page != nil {
|
||||
toSerialize["page"] = o.Page
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableV1ListPackagesResponse struct {
|
||||
value *V1ListPackagesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableV1ListPackagesResponse) Get() *V1ListPackagesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableV1ListPackagesResponse) Set(val *V1ListPackagesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableV1ListPackagesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableV1ListPackagesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableV1ListPackagesResponse(val *V1ListPackagesResponse) *NullableV1ListPackagesResponse {
|
||||
return &NullableV1ListPackagesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableV1ListPackagesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableV1ListPackagesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user