diff --git a/.drone.yml b/.drone.yml index 823cee2d..95a4e6be 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,7 +5,7 @@ name: default steps: - name: dep - image: golang:1.17 + image: golang:1.18 environment: ACCESS_TOKEN: from_secret: GIT_ACCESS_TOKEN @@ -20,7 +20,7 @@ steps: - name: gopath path: /go - name: check - image: golang:1.17 + image: golang:1.18 environment: ACCESS_TOKEN: from_secret: GIT_ACCESS_TOKEN @@ -33,7 +33,7 @@ steps: - name: gopath path: /go - name: build - image: golang:1.17 + image: golang:1.18 commands: - export PATH=$PATH:$(go env GOPATH)/bin - make build diff --git a/Dockerfile b/Dockerfile index f4ccec8b..3390c086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ############################ # STEP 1 build executable binary ############################ -FROM golang:1.17 as builder +FROM golang:1.18 as builder ARG GITHUB_ACCESS_TOKEN diff --git a/Makefile b/Makefile index 7b19db21..edb0e14d 100644 --- a/Makefile +++ b/Makefile @@ -25,14 +25,14 @@ all: dep generate build ## Pulls down required deps, runs required code generat # Install oapi-codegen to generate ff server code from the apis $(GOBIN)/oapi-codegen: - go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.6.0 + go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.11.0 PHONY+= generate generate: ## Generates the client for the ff-servers client service - oapi-codegen -generate client -package=client ./ff-api/docs/release/client-v1.yaml > gen/client/services.gen.go - oapi-codegen -generate types -package=client ./ff-api/docs/release/client-v1.yaml > gen/client/types.gen.go - oapi-codegen -generate client -package=admin ./ff-api/docs/release/admin-v1.yaml > gen/admin/services.gen.go - oapi-codegen -generate types -package=admin ./ff-api/docs/release/admin-v1.yaml > gen/admin/types.gen.go + oapi-codegen --config ./ff-api/config/ff-proxy/client-client.yaml ./ff-api/docs/release/client-v1.yaml > gen/client/services.gen.go + oapi-codegen --config ./ff-api/config/ff-proxy/client-types.yaml ./ff-api/docs/release/client-v1.yaml > gen/client/types.gen.go + oapi-codegen --config ./ff-api/config/ff-proxy/admin-client.yaml ./ff-api/docs/release/admin-v1.yaml > gen/admin/services.gen.go + oapi-codegen --config ./ff-api/config/ff-proxy/admin-types.yaml ./ff-api/docs/release/admin-v1.yaml > gen/admin/types.gen.go PHONY+= build build: ## Builds the ff-proxy service binary diff --git a/cache/in_mem.go b/cache/in_mem.go index c06c8f31..e570c01e 100644 --- a/cache/in_mem.go +++ b/cache/in_mem.go @@ -18,6 +18,40 @@ type MemCache struct { data map[string]map[string][]byte } +// GetByte gets the value of a field for a given key +func (m MemCache) GetByte(ctx context.Context, key string, field string) ([]byte, error) { + m.RLock() + defer m.RUnlock() + + fields, ok := m.data[key] + if !ok { + return nil, fmt.Errorf("%w: key %q doesn't exist in memcache", domain.ErrCacheNotFound, key) + } + + value, ok := fields[field] + if !ok { + return nil, fmt.Errorf("%w: field %q doesn't exist in memcache for key: %q", domain.ErrCacheNotFound, field, key) + } + + return value, nil +} + +// SetByte sets a value in bytes in the cache for a given key and field +func (m MemCache) SetByte(ctx context.Context, key string, field string, value []byte) error { + m.Lock() + defer m.Unlock() + + if v, ok := m.data[key]; ok { + v[field] = value + return nil + } + + m.data[key] = map[string][]byte{ + field: value, + } + return nil +} + // NewMemCache creates an initialised MemCache func NewMemCache() MemCache { return MemCache{&sync.RWMutex{}, map[string]map[string][]byte{}} @@ -76,7 +110,7 @@ func (m MemCache) Get(ctx context.Context, key string, field string, v encoding. } if err := v.UnmarshalBinary(value); err != nil { - return fmt.Errorf("%w: failed to unmarshal value to %T for key: %q, field: %q", v, key, field, domain.ErrCacheInternal) + return fmt.Errorf("%v: failed to unmarshal value to %T for key: %q, field: %q", v, key, field, domain.ErrCacheInternal) } return nil } diff --git a/cache/redis_client.go b/cache/redis_client.go index 1890eb8e..d1b8890f 100644 --- a/cache/redis_client.go +++ b/cache/redis_client.go @@ -27,6 +27,14 @@ func (r *RedisCache) Set(ctx context.Context, key string, field string, value en return nil } +// SetByte sets a value in the cache for a given key and field +func (r *RedisCache) SetByte(ctx context.Context, key string, field string, value []byte) error { + if err := r.client.HSet(ctx, key, field, value).Err(); err != nil { + return err + } + return nil +} + // SetKV sets a key and value func (r *RedisCache) SetKV(ctx context.Context, key string, value string) error { return r.client.Set(ctx, key, value, 0).Err() @@ -60,11 +68,23 @@ func (r *RedisCache) Get(ctx context.Context, key string, field string, v encodi } if err := v.UnmarshalBinary(b); err != nil { - return fmt.Errorf("%w: failed to unmarshal value to %T for key: %q, field: %q", v, key, field, domain.ErrCacheInternal) + return fmt.Errorf("%v: failed to unmarshal value to %T for key: %q, field: %q", v, key, field, domain.ErrCacheInternal) } return nil } +// GetByte gets the value of a field for a given key +func (r *RedisCache) GetByte(ctx context.Context, key string, field string) ([]byte, error) { + b, err := r.client.HGet(ctx, key, field).Bytes() + if err != nil { + if err == redis.Nil { + return nil, fmt.Errorf("%w: field %s doesn't exist in redis for key: %s", domain.ErrCacheNotFound, field, key) + } + return nil, err + } + return b, nil +} + // GetKV gets the value for a given key func (r *RedisCache) GetKV(ctx context.Context, key string) (string, error) { res, err := r.client.Get(ctx, key).Result() diff --git a/cache/wrapper.go b/cache/wrapper.go index bd83bec1..5c342b7c 100644 --- a/cache/wrapper.go +++ b/cache/wrapper.go @@ -3,12 +3,15 @@ package cache import ( "context" "encoding" + "encoding/json" "fmt" + "strings" "sync" "time" + "github.com/harness/ff-golang-server-sdk/rest" + "github.com/harness/ff-golang-server-sdk/dto" - "github.com/harness/ff-golang-server-sdk/evaluation" "github.com/harness/ff-golang-server-sdk/logger" "github.com/harness/ff-proxy/domain" "github.com/harness/ff-proxy/log" @@ -25,8 +28,12 @@ import ( type Cache interface { // Set sets a value in the cache for a given key and field Set(ctx context.Context, key string, field string, value encoding.BinaryMarshaler) error + // SetByte sets a value in the cache for a given key and field + SetByte(ctx context.Context, key string, field string, value []byte) error // Get gets the value of a field for a given key Get(ctx context.Context, key string, field string, v encoding.BinaryUnmarshaler) error + // GetByte gets the value of a field for a given key + GetByte(ctx context.Context, key string, field string) ([]byte, error) // GetAll gets all of the fiels and their values for a given key GetAll(ctx context.Context, key string) (map[string][]byte, error) // RemoveAll removes all the fields and their values for a given key @@ -93,13 +100,36 @@ func (wrapper *Wrapper) Set(key interface{}, value interface{}) (evicted bool) { return } - domainValue, err := wrapper.convertEvaluationToDomain(cacheKey.kind, value) - if err != nil { - wrapper.logger.Error("failed to convert Evaluation object to Domain object", "err", err) + var val []byte + switch cacheKey.kind { + case dto.KeySegment: + segmentConfig, ok := value.(rest.Segment) + if !ok { + wrapper.logger.Error("failed to cast value in cache to rest.Segment") + return + } + val, err = json.Marshal(segmentConfig) + if err != nil { + wrapper.logger.Error("failed to marshal segmentConfig", "err", err) + return + } + case dto.KeyFeature: + featureConfig, ok := value.(rest.FeatureConfig) + if !ok { + wrapper.logger.Error("failed to cast value in cache to rest.FeatureConfig") + return + } + val, err = json.Marshal(featureConfig) + if err != nil { + wrapper.logger.Error("failed to marshal featureConfig", "err", err) + return + } + default: + wrapper.logger.Error("unexpected type trying to be set") return } - err = wrapper.cache.Set(context.Background(), cacheKey.name, cacheKey.field, domainValue) + err = wrapper.cache.SetByte(context.Background(), cacheKey.name, cacheKey.field, val) if err != nil { wrapper.logger.Warn("failed to set key to wrapper cache", "err", err) return @@ -214,9 +244,9 @@ func (wrapper *Wrapper) Resize(size int) (evicted int) { */ func (wrapper *Wrapper) decodeDTOKey(key interface{}) (cacheKey, error) { - // decode key - dtoKey, ok := key.(dto.Key) - if !ok { + + dtoKey, err := convertToDTOKey(key) + if err != nil { return cacheKey{}, fmt.Errorf("couldn't convert key to dto.Key: %s", key) } @@ -244,27 +274,6 @@ func (wrapper *Wrapper) generateKeyName(keyType string) (string, error) { } } -// convertEvaluationToDomain converts the data being cached by the sdk to it's appropriate internal type i.e. domain.FeatureFlag -func (wrapper *Wrapper) convertEvaluationToDomain(keyType string, value interface{}) (encoding.BinaryMarshaler, error) { - switch keyType { - case dto.KeyFeature: - featureConfig, ok := value.(evaluation.FeatureConfig) - if !ok { - return &domain.FeatureFlag{}, fmt.Errorf("couldn't convert to evaluation.FeatureFlag") - } - - return domain.ConvertEvaluationFeatureConfig(featureConfig), nil - case dto.KeySegment: - segmentConfig, ok := value.(evaluation.Segment) - if !ok { - return &domain.Segment{}, fmt.Errorf("couldn't convert to evaluation.Segment") - } - return domain.ConvertEvaluationSegment(segmentConfig), nil - default: - return nil, fmt.Errorf("key type not recognised: %s", keyType) - } -} - func (wrapper *Wrapper) getKeysByType(keyType string) []interface{} { wrapper.logger = wrapper.logger.With("method", "getKeysByType", "keyType", keyType) @@ -317,33 +326,55 @@ func (wrapper *Wrapper) get(key cacheKey) (interface{}, error) { } func (wrapper *Wrapper) getFeatureConfig(key cacheKey) (interface{}, error) { - var val encoding.BinaryUnmarshaler = &domain.FeatureConfig{} - // get FeatureFlag in domain.FeatureFlag format - err := wrapper.cache.Get(context.Background(), key.name, key.field, val) + // get FeatureFlag in rest.FeatureConfig format + var featureConfig = rest.FeatureConfig{} + val, err := wrapper.cache.GetByte(context.Background(), key.name, key.field) if err != nil { return nil, err } - featureConfig, ok := val.(*domain.FeatureConfig) - if !ok { - return nil, fmt.Errorf("couldn't cast cached value to domain.FeatureFlag: %s", val) - } - // return to sdk in evaluation.FeatureFlag format - return *domain.ConvertDomainFeatureConfig(*featureConfig), nil + err = json.Unmarshal(val, &featureConfig) + if err != nil { + return nil, fmt.Errorf("couldn't cast cached value to rest.FeatureConfig: %s", val) + } + // return to sdk in rest.FeatureConfig format + return featureConfig, nil } func (wrapper *Wrapper) getSegment(key cacheKey) (interface{}, error) { - var val encoding.BinaryUnmarshaler = &domain.Segment{} + var segment = rest.Segment{} // get Segment in domain.Segment format - err := wrapper.cache.Get(context.Background(), key.name, key.field, val) + val, err := wrapper.cache.GetByte(context.Background(), key.name, key.field) if err != nil { return nil, err } - segment, ok := val.(*domain.Segment) - if !ok { - return nil, fmt.Errorf("couldn't cast cached value to domain.Segment: %s", val) + + err = json.Unmarshal(val, &segment) + if err != nil { + return nil, fmt.Errorf("couldn't cast cached value to rest.Segment: %s", val) } // return to sdk in evaluation.Segment format - return domain.ConvertDomainSegment(*segment), nil + return segment, nil +} + +func convertToDTOKey(key interface{}) (dto.Key, error) { + myKey, ok := key.(string) + if !ok { + dtoKey, ok := key.(dto.Key) + if !ok { + return dto.Key{}, fmt.Errorf("couldn't convert key to dto.Key: %s", key) + } + return dtoKey, nil + } + + keyArr := strings.SplitN(myKey, "/", 2) + if len(keyArr) != 2 { + return dto.Key{}, fmt.Errorf("couldn't convert key to dto.Key: %s", key) + } + dtoKey := dto.Key{ + Type: keyArr[0], + Name: keyArr[1], + } + return dtoKey, nil } diff --git a/cache/wrapper_test.go b/cache/wrapper_test.go index 2faaa71c..249fd744 100644 --- a/cache/wrapper_test.go +++ b/cache/wrapper_test.go @@ -5,8 +5,9 @@ import ( "testing" "time" + "github.com/harness/ff-golang-server-sdk/rest" + "github.com/harness/ff-golang-server-sdk/dto" - "github.com/harness/ff-golang-server-sdk/evaluation" "github.com/harness/ff-proxy/log" "github.com/stretchr/testify/assert" ) @@ -18,17 +19,17 @@ func int64Ptr(i int64) *int64 { return &i } func memCachePtr(m MemCache) *MemCache { return &m } var ( - evaluationSegmentFoo = evaluation.Segment{ + evaluationSegmentFoo = rest.Segment{ Identifier: "foo", Name: "fooSegment", CreatedAt: int64Ptr(123), ModifiedAt: int64Ptr(456), Environment: strPtr("env"), - Excluded: []string{"ecl1", "exlc2"}, - Included: []string{"incl1", "incl2"}, - Rules: []evaluation.Clause{{Attribute: "attr", ID: "id", Negate: false, Op: "contains", Value: []string{"val1", "val2"}}}, - Tags: []evaluation.Tag{{Name: "tagName", Value: strPtr("tagValue")}}, - Version: 2, + Excluded: &[]rest.Target{{Identifier: "exlc1"}, {Identifier: "exlc2"}}, + Included: &[]rest.Target{{Identifier: "incl1"}, {Identifier: "incl2"}}, + Rules: &[]rest.Clause{{Attribute: "attr", Id: "id", Negate: false, Op: "contains", Values: []string{"val1", "val2"}}}, + Tags: &[]rest.Tag{{Name: "tagName", Value: strPtr("tagValue")}}, + Version: int64Ptr(2), } segmentFooKey = dto.Key{ @@ -36,11 +37,11 @@ var ( Name: evaluationSegmentFoo.Identifier, } - evaluationFeatureBar = evaluation.FeatureConfig{ - DefaultServe: evaluation.Serve{ - Distribution: &evaluation.Distribution{ + evaluationFeatureBar = rest.FeatureConfig{ + DefaultServe: rest.Serve{ + Distribution: &rest.Distribution{ BucketBy: "bucketfield", - Variations: []evaluation.WeightedVariation{{Variation: "var1", Weight: 30}, {Variation: "var2", Weight: 70}}, + Variations: []rest.WeightedVariation{{Variation: "var1", Weight: 30}, {Variation: "var2", Weight: 70}}, }, Variation: strPtr("var2"), }, @@ -48,29 +49,28 @@ var ( Feature: "bar", Kind: "bool", OffVariation: "false", - Prerequisites: []evaluation.Prerequisite{{Feature: "feat1", Variations: []string{"true"}}}, + Prerequisites: &[]rest.Prerequisite{{Feature: "feat1", Variations: []string{"true"}}}, Project: "proj", - Rules: []evaluation.ServingRule{ + Rules: &[]rest.ServingRule{ { - Clauses: []evaluation.Clause{{Attribute: "attr", ID: "id", Negate: false, Op: "contains", Value: []string{"val1", "val2"}}}, + Clauses: []rest.Clause{{Attribute: "attr", Id: "id", Negate: false, Op: "contains", Values: []string{"val1", "val2"}}}, Priority: 1, - RuleID: "ID", - Serve: evaluation.Serve{ + RuleId: "ID", + Serve: rest.Serve{ Distribution: nil, Variation: strPtr("str"), }, }, }, State: "on", - VariationToTargetMap: []evaluation.VariationMap{ + VariationToTargetMap: &[]rest.VariationMap{ { - TargetSegments: []string{"segment1", "segment2", "segment3"}, - Targets: []string{"target1", "target2", "target3"}, + TargetSegments: &[]string{"segment1", "segment2", "segment3"}, + Targets: &[]rest.TargetMap{{strPtr("target1"), "target1"}, {strPtr("target2"), "target2"}, {strPtr("target3"), "target3"}}, Variation: "var", }, }, - Variations: []evaluation.Variation{{Description: strPtr("desc"), Identifier: "id", Name: strPtr("name"), Value: "val"}}, - Segments: map[string]*evaluation.Segment(nil), + Variations: []rest.Variation{{Description: strPtr("desc"), Identifier: "id", Name: strPtr("name"), Value: "val"}}, } featureBarKey = dto.Key{ diff --git a/config/local_config_test.go b/config/local_config_test.go index f476b058..b4588e2e 100644 --- a/config/local_config_test.go +++ b/config/local_config_test.go @@ -44,7 +44,7 @@ var ( Clauses: []clientgen.Clause{ { Attribute: "age", - Id: "79f5bca0-17ca-42c2-8934-5cee840fe2e0", + Id: strPtr("79f5bca0-17ca-42c2-8934-5cee840fe2e0"), Negate: false, Op: "equal", Values: []string{ @@ -53,7 +53,7 @@ var ( }, }, Priority: 1, - RuleId: "8756c207-abf8-4202-83fd-dedf5d27e2c2", + RuleId: strPtr("8756c207-abf8-4202-83fd-dedf5d27e2c2"), Serve: clientgen.Serve{ Variation: strPtr("false"), }, @@ -67,7 +67,7 @@ var ( }, Targets: &[]clientgen.TargetMap{ { - Identifier: strPtr("davej"), + Identifier: "davej", Name: "Dave Johnston", }, }, @@ -133,7 +133,7 @@ var ( Rules: &[]clientgen.Clause{ { Attribute: "ip", - Id: "31c18ee7-8051-44cc-8507-b44580467ee5", + Id: strPtr("31c18ee7-8051-44cc-8507-b44580467ee5"), Negate: false, Op: "equal", Values: []string{"2a00:23c5:b672:2401:158:f2a6:67a0:6a79"}, diff --git a/domain/domainToEvaluation.go b/domain/domainToEvaluation.go index 47343ed0..16d5fbdf 100644 --- a/domain/domainToEvaluation.go +++ b/domain/domainToEvaluation.go @@ -45,7 +45,7 @@ func convertGenServe(s clientgen.Serve) *evaluation.Serve { func convertGenClause(c clientgen.Clause) *evaluation.Clause { return &evaluation.Clause{ Attribute: c.Attribute, - ID: c.Id, + ID: *c.Id, Negate: c.Negate, Op: c.Op, Value: c.Values, @@ -60,7 +60,7 @@ func convertGenServingRule(r clientgen.ServingRule) *evaluation.ServingRule { return &evaluation.ServingRule{ Clauses: clauses, Priority: r.Priority, - RuleID: r.RuleId, + RuleID: *r.RuleId, Serve: *convertGenServe(r.Serve), } } @@ -84,7 +84,7 @@ func convertGenVariationMap(v clientgen.VariationMap) *evaluation.VariationMap { func convertTargetToIdentifier(tm []clientgen.TargetMap) []string { result := make([]string, 0, len(tm)) for j := range tm { - result = append(result, *tm[j].Identifier) + result = append(result, tm[j].Identifier) } return result } @@ -175,7 +175,7 @@ func ConvertDomainSegment(s Segment) evaluation.Segment { for i, rule := range *s.Rules { rules[i] = evaluation.Clause{ Attribute: rule.Attribute, - ID: rule.Id, + ID: *rule.Id, Negate: rule.Negate, Op: rule.Op, Value: rule.Values, diff --git a/domain/evaluationToDomain.go b/domain/evaluationToDomain.go index 286b0b76..d54780a8 100644 --- a/domain/evaluationToDomain.go +++ b/domain/evaluationToDomain.go @@ -48,7 +48,7 @@ func convertEvaluationServe(s evaluation.Serve) *clientgen.Serve { func convertEvaluationClause(c evaluation.Clause) *clientgen.Clause { return &clientgen.Clause{ Attribute: c.Attribute, - Id: c.ID, + Id: &c.ID, Negate: c.Negate, Op: c.Op, Values: c.Value, @@ -63,7 +63,7 @@ func convertEvaluationServingRule(r evaluation.ServingRule) *clientgen.ServingRu return &clientgen.ServingRule{ Clauses: clauses, Priority: r.Priority, - RuleId: r.RuleID, + RuleId: &r.RuleID, Serve: *convertEvaluationServe(r.Serve), } } @@ -88,7 +88,7 @@ func convertEvaluationTargetToTargetMap(targets []string) *[]clientgen.TargetMap result := make([]clientgen.TargetMap, 0, len(targets)) for j := range targets { result = append(result, clientgen.TargetMap{ - Identifier: &targets[j], + Identifier: targets[j], }) } return &result @@ -136,7 +136,7 @@ func ConvertEvaluationFeatureConfig(fc evaluation.FeatureConfig) *FeatureFlag { DefaultServe: defaultServe, Environment: fc.Environment, Feature: fc.Feature, - Kind: fc.Kind, + Kind: clientgen.FeatureConfigKind(fc.Kind), OffVariation: fc.OffVariation, Prerequisites: &pre, Project: fc.Project, @@ -174,7 +174,7 @@ func ConvertEvaluationSegment(s evaluation.Segment) *Segment { for i, rule := range s.Rules { rules[i] = clientgen.Clause{ Attribute: rule.Attribute, - Id: rule.ID, + Id: &rule.ID, Negate: rule.Negate, Op: rule.Op, Values: rule.Value, diff --git a/ff-api b/ff-api index 25a8e017..eaf696f5 160000 --- a/ff-api +++ b/ff-api @@ -1 +1 @@ -Subproject commit 25a8e0171cfe23f2008b8384a7bf3f5f18fb9ac0 +Subproject commit eaf696f561a087e70228b56cdc00329d92a909e7 diff --git a/gen/admin/services.gen.go b/gen/admin/services.gen.go index 5b81a199..a6539d72 100644 --- a/gen/admin/services.gen.go +++ b/gen/admin/services.gen.go @@ -1,6 +1,6 @@ // Package admin provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT. package admin import ( @@ -93,18 +93,18 @@ type ClientInterface interface { // GetAllAPIKeys request GetAllAPIKeys(ctx context.Context, params *GetAllAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // AddAPIKey request with any body + // AddAPIKey request with any body AddAPIKeyWithBody(ctx context.Context, params *AddAPIKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) AddAPIKey(ctx context.Context, params *AddAPIKeyParams, body AddAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteApiKey request - DeleteApiKey(ctx context.Context, identifier Identifier, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteAPIKey request + DeleteAPIKey(ctx context.Context, identifier Identifier, params *DeleteAPIKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAPIKey request GetAPIKey(ctx context.Context, identifier Identifier, params *GetAPIKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateAPIKey request with any body + // UpdateAPIKey request with any body UpdateAPIKeyWithBody(ctx context.Context, identifier Identifier, params *UpdateAPIKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateAPIKey(ctx context.Context, identifier Identifier, params *UpdateAPIKeyParams, body UpdateAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -115,7 +115,7 @@ type ClientInterface interface { // GetAllEnvironments request GetAllEnvironments(ctx context.Context, params *GetAllEnvironmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateEnvironment request with any body + // CreateEnvironment request with any body CreateEnvironmentWithBody(ctx context.Context, params *CreateEnvironmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateEnvironment(ctx context.Context, params *CreateEnvironmentParams, body CreateEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -126,7 +126,7 @@ type ClientInterface interface { // GetEnvironment request GetEnvironment(ctx context.Context, identifier Identifier, params *GetEnvironmentParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // ModifyEnvironment request with any body + // ModifyEnvironment request with any body ModifyEnvironmentWithBody(ctx context.Context, identifier Identifier, params *ModifyEnvironmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) ModifyEnvironment(ctx context.Context, identifier Identifier, params *ModifyEnvironmentParams, body ModifyEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -134,18 +134,21 @@ type ClientInterface interface { // GetAllFeatures request GetAllFeatures(ctx context.Context, params *GetAllFeaturesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateFeatureFlag request with any body + // CreateFeatureFlag request with any body CreateFeatureFlagWithBody(ctx context.Context, params *CreateFeatureFlagParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateFeatureFlag(ctx context.Context, params *CreateFeatureFlagParams, body CreateFeatureFlagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetAvailableFeaturePipelines request + GetAvailableFeaturePipelines(ctx context.Context, params *GetAvailableFeaturePipelinesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetFeatureMetrics request GetFeatureMetrics(ctx context.Context, params *GetFeatureMetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetFlagsYaml request GetFlagsYaml(ctx context.Context, params *GetFlagsYamlParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateFlagsYaml request with any body + // UpdateFlagsYaml request with any body UpdateFlagsYamlWithBody(ctx context.Context, params *UpdateFlagsYamlParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateFlagsYaml(ctx context.Context, params *UpdateFlagsYamlParams, body UpdateFlagsYamlJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -156,7 +159,7 @@ type ClientInterface interface { // GetFeatureFlag request GetFeatureFlag(ctx context.Context, identifier Identifier, params *GetFeatureFlagParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // PatchFeature request with any body + // PatchFeature request with any body PatchFeatureWithBody(ctx context.Context, identifier Identifier, params *PatchFeatureParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PatchFeature(ctx context.Context, identifier Identifier, params *PatchFeatureParams, body PatchFeatureJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -164,13 +167,29 @@ type ClientInterface interface { // GetFeatureEvaluations request GetFeatureEvaluations(ctx context.Context, identifier Identifier, params *GetFeatureEvaluationsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetOSById request - GetOSById(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteFeaturePipeline request + DeleteFeaturePipeline(ctx context.Context, identifier Identifier, params *DeleteFeaturePipelineParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetFeaturePipeline request + GetFeaturePipeline(ctx context.Context, identifier Identifier, params *GetFeaturePipelineParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchFeaturePipeline request with any body + PatchFeaturePipelineWithBody(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchFeaturePipeline(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, body PatchFeaturePipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateFlagPipeline request with any body + CreateFlagPipelineWithBody(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateFlagPipeline(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, body CreateFlagPipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOSByID request + GetOSByID(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAllProjects request GetAllProjects(ctx context.Context, params *GetAllProjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateProject request with any body + // CreateProject request with any body CreateProjectWithBody(ctx context.Context, params *CreateProjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateProject(ctx context.Context, params *CreateProjectParams, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -181,7 +200,7 @@ type ClientInterface interface { // GetProject request GetProject(ctx context.Context, identifier Identifier, params *GetProjectParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // ModifyProject request with any body + // ModifyProject request with any body ModifyProjectWithBody(ctx context.Context, identifier Identifier, params *ModifyProjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) ModifyProject(ctx context.Context, identifier Identifier, params *ModifyProjectParams, body ModifyProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -192,12 +211,12 @@ type ClientInterface interface { // GetGitRepo request GetGitRepo(ctx context.Context, identifier Identifier, params *GetGitRepoParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // PatchGitRepo request with any body + // PatchGitRepo request with any body PatchGitRepoWithBody(ctx context.Context, identifier Identifier, params *PatchGitRepoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PatchGitRepo(ctx context.Context, identifier Identifier, params *PatchGitRepoParams, body PatchGitRepoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateGitRepo request with any body + // CreateGitRepo request with any body CreateGitRepoWithBody(ctx context.Context, identifier Identifier, params *CreateGitRepoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateGitRepo(ctx context.Context, identifier Identifier, params *CreateGitRepoParams, body CreateGitRepoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -205,7 +224,7 @@ type ClientInterface interface { // GetAllSegments request GetAllSegments(ctx context.Context, params *GetAllSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateSegment request with any body + // CreateSegment request with any body CreateSegmentWithBody(ctx context.Context, params *CreateSegmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateSegment(ctx context.Context, params *CreateSegmentParams, body CreateSegmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -216,7 +235,7 @@ type ClientInterface interface { // GetSegment request GetSegment(ctx context.Context, identifier Identifier, params *GetSegmentParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // PatchSegment request with any body + // PatchSegment request with any body PatchSegmentWithBody(ctx context.Context, identifier Identifier, params *PatchSegmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PatchSegment(ctx context.Context, identifier Identifier, params *PatchSegmentParams, body PatchSegmentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -230,7 +249,7 @@ type ClientInterface interface { // GetAllTargets request GetAllTargets(ctx context.Context, params *GetAllTargetsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateTarget request with any body + // CreateTarget request with any body CreateTargetWithBody(ctx context.Context, params *CreateTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateTarget(ctx context.Context, params *CreateTargetParams, body CreateTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -244,7 +263,7 @@ type ClientInterface interface { // GetAllTargetAttributes request GetAllTargetAttributes(ctx context.Context, params *GetAllTargetAttributesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // UploadTargets request with any body + // UploadTargets request with any body UploadTargetsWithBody(ctx context.Context, params *UploadTargetsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteTarget request @@ -253,12 +272,12 @@ type ClientInterface interface { // GetTarget request GetTarget(ctx context.Context, identifier Identifier, params *GetTargetParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // PatchTarget request with any body + // PatchTarget request with any body PatchTargetWithBody(ctx context.Context, identifier Identifier, params *PatchTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PatchTarget(ctx context.Context, identifier Identifier, params *PatchTargetParams, body PatchTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ModifyTarget request with any body + // ModifyTarget request with any body ModifyTargetWithBody(ctx context.Context, identifier Identifier, params *ModifyTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) ModifyTarget(ctx context.Context, identifier Identifier, params *ModifyTargetParams, body ModifyTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -268,6 +287,9 @@ type ClientInterface interface { // GetTargetSegments request GetTargetSegments(ctx context.Context, identifier Identifier, params *GetTargetSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetLicenseUsage request + GetLicenseUsage(ctx context.Context, params *GetLicenseUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) } func (c *Client) GetAllAPIKeys(ctx context.Context, params *GetAllAPIKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -306,8 +328,8 @@ func (c *Client) AddAPIKey(ctx context.Context, params *AddAPIKeyParams, body Ad return c.Client.Do(req) } -func (c *Client) DeleteApiKey(ctx context.Context, identifier Identifier, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteApiKeyRequest(c.Server, identifier, params) +func (c *Client) DeleteAPIKey(ctx context.Context, identifier Identifier, params *DeleteAPIKeyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAPIKeyRequest(c.Server, identifier, params) if err != nil { return nil, err } @@ -486,6 +508,18 @@ func (c *Client) CreateFeatureFlag(ctx context.Context, params *CreateFeatureFla return c.Client.Do(req) } +func (c *Client) GetAvailableFeaturePipelines(ctx context.Context, params *GetAvailableFeaturePipelinesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAvailableFeaturePipelinesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) GetFeatureMetrics(ctx context.Context, params *GetFeatureMetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetFeatureMetricsRequest(c.Server, params) if err != nil { @@ -594,8 +628,80 @@ func (c *Client) GetFeatureEvaluations(ctx context.Context, identifier Identifie return c.Client.Do(req) } -func (c *Client) GetOSById(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOSByIdRequest(c.Server, identifiers) +func (c *Client) DeleteFeaturePipeline(ctx context.Context, identifier Identifier, params *DeleteFeaturePipelineParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteFeaturePipelineRequest(c.Server, identifier, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetFeaturePipeline(ctx context.Context, identifier Identifier, params *GetFeaturePipelineParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetFeaturePipelineRequest(c.Server, identifier, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchFeaturePipelineWithBody(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchFeaturePipelineRequestWithBody(c.Server, identifier, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchFeaturePipeline(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, body PatchFeaturePipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchFeaturePipelineRequest(c.Server, identifier, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateFlagPipelineWithBody(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateFlagPipelineRequestWithBody(c.Server, identifier, params, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) CreateFlagPipeline(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, body CreateFlagPipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateFlagPipelineRequest(c.Server, identifier, params, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOSByID(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOSByIDRequest(c.Server, identifiers) if err != nil { return nil, err } @@ -1050,6 +1156,18 @@ func (c *Client) GetTargetSegments(ctx context.Context, identifier Identifier, p return c.Client.Do(req) } +func (c *Client) GetLicenseUsage(ctx context.Context, params *GetLicenseUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetLicenseUsageRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + // NewGetAllAPIKeysRequest generates requests for GetAllAPIKeys func NewGetAllAPIKeysRequest(server string, params *GetAllAPIKeysParams) (*http.Request, error) { var err error @@ -1061,13 +1179,13 @@ func NewGetAllAPIKeysRequest(server string, params *GetAllAPIKeysParams) (*http. operationPath := fmt.Sprintf("/admin/apikey") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -1083,7 +1201,7 @@ func NewGetAllAPIKeysRequest(server string, params *GetAllAPIKeysParams) (*http. } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1095,7 +1213,7 @@ func NewGetAllAPIKeysRequest(server string, params *GetAllAPIKeysParams) (*http. } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1107,7 +1225,7 @@ func NewGetAllAPIKeysRequest(server string, params *GetAllAPIKeysParams) (*http. } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1183,13 +1301,13 @@ func NewAddAPIKeyRequestWithBody(server string, params *AddAPIKeyParams, content operationPath := fmt.Sprintf("/admin/apikey") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -1205,7 +1323,7 @@ func NewAddAPIKeyRequestWithBody(server string, params *AddAPIKeyParams, content } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1217,7 +1335,7 @@ func NewAddAPIKeyRequestWithBody(server string, params *AddAPIKeyParams, content } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1229,7 +1347,7 @@ func NewAddAPIKeyRequestWithBody(server string, params *AddAPIKeyParams, content } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1253,8 +1371,8 @@ func NewAddAPIKeyRequestWithBody(server string, params *AddAPIKeyParams, content return req, nil } -// NewDeleteApiKeyRequest generates requests for DeleteApiKey -func NewDeleteApiKeyRequest(server string, identifier Identifier, params *DeleteApiKeyParams) (*http.Request, error) { +// NewDeleteAPIKeyRequest generates requests for DeleteAPIKey +func NewDeleteAPIKeyRequest(server string, identifier Identifier, params *DeleteAPIKeyParams) (*http.Request, error) { var err error var pathParam0 string @@ -1271,17 +1389,17 @@ func NewDeleteApiKeyRequest(server string, identifier Identifier, params *Delete operationPath := fmt.Sprintf("/admin/apikey/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1293,7 +1411,7 @@ func NewDeleteApiKeyRequest(server string, identifier Identifier, params *Delete } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1317,7 +1435,7 @@ func NewDeleteApiKeyRequest(server string, identifier Identifier, params *Delete } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1357,17 +1475,17 @@ func NewGetAPIKeyRequest(server string, identifier Identifier, params *GetAPIKey operationPath := fmt.Sprintf("/admin/apikey/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1379,7 +1497,7 @@ func NewGetAPIKeyRequest(server string, identifier Identifier, params *GetAPIKey } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1403,7 +1521,7 @@ func NewGetAPIKeyRequest(server string, identifier Identifier, params *GetAPIKey } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1454,17 +1572,17 @@ func NewUpdateAPIKeyRequestWithBody(server string, identifier Identifier, params operationPath := fmt.Sprintf("/admin/apikey/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1476,7 +1594,7 @@ func NewUpdateAPIKeyRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1500,7 +1618,7 @@ func NewUpdateAPIKeyRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1535,19 +1653,19 @@ func NewGetAuditByParamsRequest(server string, params *GetAuditByParamsParams) ( operationPath := fmt.Sprintf("/admin/audit") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() - if params.Environment != nil { + if params.EnvironmentIdentifier != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, *params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1561,9 +1679,9 @@ func NewGetAuditByParamsRequest(server string, params *GetAuditByParamsParams) ( } - if params.Project != nil { + if params.ProjectIdentifier != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, *params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, *params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1589,7 +1707,7 @@ func NewGetAuditByParamsRequest(server string, params *GetAuditByParamsParams) ( } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1778,13 +1896,13 @@ func NewGetAllEnvironmentsRequest(server string, params *GetAllEnvironmentsParam operationPath := fmt.Sprintf("/admin/environments") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -1800,7 +1918,7 @@ func NewGetAllEnvironmentsRequest(server string, params *GetAllEnvironmentsParam } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1812,7 +1930,7 @@ func NewGetAllEnvironmentsRequest(server string, params *GetAllEnvironmentsParam } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1920,13 +2038,13 @@ func NewCreateEnvironmentRequestWithBody(server string, params *CreateEnvironmen operationPath := fmt.Sprintf("/admin/environments") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -1942,7 +2060,7 @@ func NewCreateEnvironmentRequestWithBody(server string, params *CreateEnvironmen } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -1984,17 +2102,17 @@ func NewDeleteEnvironmentRequest(server string, identifier Identifier, params *D operationPath := fmt.Sprintf("/admin/environments/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2018,7 +2136,7 @@ func NewDeleteEnvironmentRequest(server string, identifier Identifier, params *D } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2058,17 +2176,17 @@ func NewGetEnvironmentRequest(server string, identifier Identifier, params *GetE operationPath := fmt.Sprintf("/admin/environments/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2092,7 +2210,7 @@ func NewGetEnvironmentRequest(server string, identifier Identifier, params *GetE } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2143,13 +2261,13 @@ func NewModifyEnvironmentRequestWithBody(server string, identifier Identifier, p operationPath := fmt.Sprintf("/admin/environments/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2165,7 +2283,7 @@ func NewModifyEnvironmentRequestWithBody(server string, identifier Identifier, p } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2177,7 +2295,7 @@ func NewModifyEnvironmentRequestWithBody(server string, identifier Identifier, p } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2212,13 +2330,13 @@ func NewGetAllFeaturesRequest(server string, params *GetAllFeaturesParams) (*htt operationPath := fmt.Sprintf("/admin/features") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2234,7 +2352,7 @@ func NewGetAllFeaturesRequest(server string, params *GetAllFeaturesParams) (*htt } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2246,7 +2364,7 @@ func NewGetAllFeaturesRequest(server string, params *GetAllFeaturesParams) (*htt } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2258,9 +2376,9 @@ func NewGetAllFeaturesRequest(server string, params *GetAllFeaturesParams) (*htt } } - if params.Environment != nil { + if params.EnvironmentIdentifier != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, *params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2418,6 +2536,22 @@ func NewGetAllFeaturesRequest(server string, params *GetAllFeaturesParams) (*htt } + if params.TargetIdentifierFilter != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targetIdentifierFilter", runtime.ParamLocationQuery, *params.TargetIdentifierFilter); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + if params.Metrics != nil { if queryFrag, err := runtime.StyleParamWithLocation("form", true, "metrics", runtime.ParamLocationQuery, *params.Metrics); err != nil { @@ -2434,6 +2568,102 @@ func NewGetAllFeaturesRequest(server string, params *GetAllFeaturesParams) (*htt } + if params.FeatureIdentifiers != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "featureIdentifiers", runtime.ParamLocationQuery, *params.FeatureIdentifiers); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ExcludedFeatures != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "excludedFeatures", runtime.ParamLocationQuery, *params.ExcludedFeatures); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "status", runtime.ParamLocationQuery, *params.Status); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Lifetime != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "lifetime", runtime.ParamLocationQuery, *params.Lifetime); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Enabled != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "enabled", runtime.ParamLocationQuery, *params.Enabled); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.FlagCounts != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "flagCounts", runtime.ParamLocationQuery, *params.FlagCounts); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -2466,13 +2696,13 @@ func NewCreateFeatureFlagRequestWithBody(server string, params *CreateFeatureFla operationPath := fmt.Sprintf("/admin/features") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2488,7 +2718,7 @@ func NewCreateFeatureFlagRequestWithBody(server string, params *CreateFeatureFla } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2512,8 +2742,8 @@ func NewCreateFeatureFlagRequestWithBody(server string, params *CreateFeatureFla return req, nil } -// NewGetFeatureMetricsRequest generates requests for GetFeatureMetrics -func NewGetFeatureMetricsRequest(server string, params *GetFeatureMetricsParams) (*http.Request, error) { +// NewGetAvailableFeaturePipelinesRequest generates requests for GetAvailableFeaturePipelines +func NewGetAvailableFeaturePipelinesRequest(server string, params *GetAvailableFeaturePipelinesParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2521,15 +2751,15 @@ func NewGetFeatureMetricsRequest(server string, params *GetFeatureMetricsParams) return nil, err } - operationPath := fmt.Sprintf("/admin/features/metrics") + operationPath := fmt.Sprintf("/admin/features/available_pipelines") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2545,7 +2775,7 @@ func NewGetFeatureMetricsRequest(server string, params *GetFeatureMetricsParams) } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2557,7 +2787,7 @@ func NewGetFeatureMetricsRequest(server string, params *GetFeatureMetricsParams) } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2569,19 +2799,134 @@ func NewGetFeatureMetricsRequest(server string, params *GetFeatureMetricsParams) } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + if params.PipelineName != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "featureIDs", runtime.ParamLocationQuery, params.FeatureIDs); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pipelineName", runtime.ParamLocationQuery, *params.PipelineName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetFeatureMetricsRequest generates requests for GetFeatureMetrics +func NewGetFeatureMetricsRequest(server string, params *GetFeatureMetricsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/features/metrics") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "featureIDs", runtime.ParamLocationQuery, params.FeatureIDs); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2614,13 +2959,13 @@ func NewGetFlagsYamlRequest(server string, params *GetFlagsYamlParams) (*http.Re operationPath := fmt.Sprintf("/admin/features/yaml") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2636,7 +2981,7 @@ func NewGetFlagsYamlRequest(server string, params *GetFlagsYamlParams) (*http.Re } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2648,7 +2993,7 @@ func NewGetFlagsYamlRequest(server string, params *GetFlagsYamlParams) (*http.Re } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2692,13 +3037,13 @@ func NewUpdateFlagsYamlRequestWithBody(server string, params *UpdateFlagsYamlPar operationPath := fmt.Sprintf("/admin/features/yaml") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2714,7 +3059,7 @@ func NewUpdateFlagsYamlRequestWithBody(server string, params *UpdateFlagsYamlPar } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2726,7 +3071,7 @@ func NewUpdateFlagsYamlRequestWithBody(server string, params *UpdateFlagsYamlPar } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2768,13 +3113,13 @@ func NewDeleteFeatureFlagRequest(server string, identifier Identifier, params *D operationPath := fmt.Sprintf("/admin/features/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2790,7 +3135,7 @@ func NewDeleteFeatureFlagRequest(server string, identifier Identifier, params *D } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2802,7 +3147,7 @@ func NewDeleteFeatureFlagRequest(server string, identifier Identifier, params *D } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2858,13 +3203,13 @@ func NewGetFeatureFlagRequest(server string, identifier Identifier, params *GetF operationPath := fmt.Sprintf("/admin/features/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2880,7 +3225,7 @@ func NewGetFeatureFlagRequest(server string, identifier Identifier, params *GetF } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2892,7 +3237,7 @@ func NewGetFeatureFlagRequest(server string, identifier Identifier, params *GetF } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2904,9 +3249,9 @@ func NewGetFeatureFlagRequest(server string, identifier Identifier, params *GetF } } - if params.Environment != nil { + if params.EnvironmentIdentifier != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, *params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2959,13 +3304,13 @@ func NewPatchFeatureRequestWithBody(server string, identifier Identifier, params operationPath := fmt.Sprintf("/admin/features/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -2981,7 +3326,7 @@ func NewPatchFeatureRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -2993,7 +3338,7 @@ func NewPatchFeatureRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3005,9 +3350,9 @@ func NewPatchFeatureRequestWithBody(server string, identifier Identifier, params } } - if params.Environment != nil { + if params.EnvironmentIdentifier != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, *params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3051,13 +3396,13 @@ func NewGetFeatureEvaluationsRequest(server string, identifier Identifier, param operationPath := fmt.Sprintf("/admin/features/%s/evaluations", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -3073,7 +3418,7 @@ func NewGetFeatureEvaluationsRequest(server string, identifier Identifier, param } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3085,7 +3430,7 @@ func NewGetFeatureEvaluationsRequest(server string, identifier Identifier, param } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3097,9 +3442,9 @@ func NewGetFeatureEvaluationsRequest(server string, identifier Identifier, param } } - if params.Environment != nil { + if params.EnvironmentIdentifier != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, *params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, *params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3155,13 +3500,13 @@ func NewGetFeatureEvaluationsRequest(server string, identifier Identifier, param return req, nil } -// NewGetOSByIdRequest generates requests for GetOSById -func NewGetOSByIdRequest(server string, identifiers Identifiers) (*http.Request, error) { +// NewDeleteFeaturePipelineRequest generates requests for DeleteFeaturePipeline +func NewDeleteFeaturePipelineRequest(server string, identifier Identifier, params *DeleteFeaturePipelineParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifiers", runtime.ParamLocationPath, identifiers) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) if err != nil { return nil, err } @@ -3171,43 +3516,16 @@ func NewGetOSByIdRequest(server string, identifiers Identifiers) (*http.Request, return nil, err } - operationPath := fmt.Sprintf("/admin/objects/%s", pathParam0) + operationPath := fmt.Sprintf("/admin/features/%s/pipeline", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, - } - - queryURL := serverURL.ResolveReference(&operationURL) - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err + operationPath = "." + operationPath } - return req, nil -} - -// NewGetAllProjectsRequest generates requests for GetAllProjects -func NewGetAllProjectsRequest(server string, params *GetAllProjectsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/projects") - if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, - } - - queryURL := serverURL.ResolveReference(&operationURL) - queryValues := queryURL.Query() if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { @@ -3222,7 +3540,7 @@ func NewGetAllProjectsRequest(server string, params *GetAllProjectsParams) (*htt } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3234,73 +3552,33 @@ func NewGetAllProjectsRequest(server string, params *GetAllProjectsParams) (*htt } } - if params.PageNumber != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PageSize != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SortOrder != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } - } - if params.SortByField != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) } } - } queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -3308,35 +3586,31 @@ func NewGetAllProjectsRequest(server string, params *GetAllProjectsParams) (*htt return req, nil } -// NewCreateProjectRequest calls the generic CreateProject builder with application/json body -func NewCreateProjectRequest(server string, params *CreateProjectParams, body CreateProjectJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) +// NewGetFeaturePipelineRequest generates requests for GetFeaturePipeline +func NewGetFeaturePipelineRequest(server string, identifier Identifier, params *GetFeaturePipelineParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) if err != nil { return nil, err } - bodyReader = bytes.NewReader(buf) - return NewCreateProjectRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewCreateProjectRequestWithBody generates requests for CreateProject with any type of body -func NewCreateProjectRequestWithBody(server string, params *CreateProjectParams, contentType string, body io.Reader) (*http.Request, error) { - var err error serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/projects") + operationPath := fmt.Sprintf("/admin/features/%s/pipeline", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -3352,7 +3626,7 @@ func NewCreateProjectRequestWithBody(server string, params *CreateProjectParams, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3364,47 +3638,7 @@ func NewCreateProjectRequestWithBody(server string, params *CreateProjectParams, } } - queryURL.RawQuery = queryValues.Encode() - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteProjectRequest generates requests for DeleteProject -func NewDeleteProjectRequest(server string, identifier Identifier, params *DeleteProjectParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/admin/projects/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, - } - - queryURL := serverURL.ResolveReference(&operationURL) - - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3416,7 +3650,7 @@ func NewDeleteProjectRequest(server string, identifier Identifier, params *Delet } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3430,7 +3664,7 @@ func NewDeleteProjectRequest(server string, identifier Identifier, params *Delet queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } @@ -3438,8 +3672,19 @@ func NewDeleteProjectRequest(server string, identifier Identifier, params *Delet return req, nil } -// NewGetProjectRequest generates requests for GetProject -func NewGetProjectRequest(server string, identifier Identifier, params *GetProjectParams) (*http.Request, error) { +// NewPatchFeaturePipelineRequest calls the generic PatchFeaturePipeline builder with application/json body +func NewPatchFeaturePipelineRequest(server string, identifier Identifier, params *PatchFeaturePipelineParams, body PatchFeaturePipelineJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchFeaturePipelineRequestWithBody(server, identifier, params, "application/json", bodyReader) +} + +// NewPatchFeaturePipelineRequestWithBody generates requests for PatchFeaturePipeline with any type of body +func NewPatchFeaturePipelineRequestWithBody(server string, identifier Identifier, params *PatchFeaturePipelineParams, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -3454,15 +3699,15 @@ func NewGetProjectRequest(server string, identifier Identifier, params *GetProje return nil, err } - operationPath := fmt.Sprintf("/admin/projects/%s", pathParam0) + operationPath := fmt.Sprintf("/admin/features/%s/pipeline", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -3478,7 +3723,31 @@ func NewGetProjectRequest(server string, identifier Identifier, params *GetProje } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3492,27 +3761,29 @@ func NewGetProjectRequest(server string, identifier Identifier, params *GetProje queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewModifyProjectRequest calls the generic ModifyProject builder with application/json body -func NewModifyProjectRequest(server string, identifier Identifier, params *ModifyProjectParams, body ModifyProjectJSONRequestBody) (*http.Request, error) { +// NewCreateFlagPipelineRequest calls the generic CreateFlagPipeline builder with application/json body +func NewCreateFlagPipelineRequest(server string, identifier Identifier, params *CreateFlagPipelineParams, body CreateFlagPipelineJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewModifyProjectRequestWithBody(server, identifier, params, "application/json", bodyReader) + return NewCreateFlagPipelineRequestWithBody(server, identifier, params, "application/json", bodyReader) } -// NewModifyProjectRequestWithBody generates requests for ModifyProject with any type of body -func NewModifyProjectRequestWithBody(server string, identifier Identifier, params *ModifyProjectParams, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateFlagPipelineRequestWithBody generates requests for CreateFlagPipeline with any type of body +func NewCreateFlagPipelineRequestWithBody(server string, identifier Identifier, params *CreateFlagPipelineParams, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -3527,15 +3798,15 @@ func NewModifyProjectRequestWithBody(server string, identifier Identifier, param return nil, err } - operationPath := fmt.Sprintf("/admin/projects/%s", pathParam0) + operationPath := fmt.Sprintf("/admin/features/%s/pipeline", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -3551,7 +3822,7 @@ func NewModifyProjectRequestWithBody(server string, identifier Identifier, param } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3563,47 +3834,7 @@ func NewModifyProjectRequestWithBody(server string, identifier Identifier, param } } - queryURL.RawQuery = queryValues.Encode() - - req, err := http.NewRequest("PUT", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteGitRepoRequest generates requests for DeleteGitRepo -func NewDeleteGitRepoRequest(server string, identifier Identifier, params *DeleteGitRepoParams) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) - if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, - } - - queryURL := serverURL.ResolveReference(&operationURL) - - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3615,7 +3846,7 @@ func NewDeleteGitRepoRequest(server string, identifier Identifier, params *Delet } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3629,21 +3860,23 @@ func NewDeleteGitRepoRequest(server string, identifier Identifier, params *Delet queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("DELETE", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetGitRepoRequest generates requests for GetGitRepo -func NewGetGitRepoRequest(server string, identifier Identifier, params *GetGitRepoParams) (*http.Request, error) { +// NewGetOSByIDRequest generates requests for GetOSByID +func NewGetOSByIDRequest(server string, identifiers Identifiers) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifiers", runtime.ParamLocationPath, identifiers) if err != nil { return nil, err } @@ -3653,15 +3886,42 @@ func NewGetGitRepoRequest(server string, identifier Identifier, params *GetGitRe return nil, err } - operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) + operationPath := fmt.Sprintf("/admin/objects/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetAllProjectsRequest generates requests for GetAllProjects +func NewGetAllProjectsRequest(server string, params *GetAllProjectsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err } - operationURL := url.URL{ - Path: operationPath, + + operationPath := fmt.Sprintf("/admin/projects") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -3677,7 +3937,7 @@ func NewGetGitRepoRequest(server string, identifier Identifier, params *GetGitRe } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3689,6 +3949,70 @@ func NewGetGitRepoRequest(server string, identifier Identifier, params *GetGitRe } } + if params.PageNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortOrder != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortByField != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -3699,42 +4023,35 @@ func NewGetGitRepoRequest(server string, identifier Identifier, params *GetGitRe return req, nil } -// NewPatchGitRepoRequest calls the generic PatchGitRepo builder with application/json body -func NewPatchGitRepoRequest(server string, identifier Identifier, params *PatchGitRepoParams, body PatchGitRepoJSONRequestBody) (*http.Request, error) { +// NewCreateProjectRequest calls the generic CreateProject builder with application/json body +func NewCreateProjectRequest(server string, params *CreateProjectParams, body CreateProjectJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchGitRepoRequestWithBody(server, identifier, params, "application/json", bodyReader) + return NewCreateProjectRequestWithBody(server, params, "application/json", bodyReader) } -// NewPatchGitRepoRequestWithBody generates requests for PatchGitRepo with any type of body -func NewPatchGitRepoRequestWithBody(server string, identifier Identifier, params *PatchGitRepoParams, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateProjectRequestWithBody generates requests for CreateProject with any type of body +func NewCreateProjectRequestWithBody(server string, params *CreateProjectParams, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) + operationPath := fmt.Sprintf("/admin/projects") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -3750,7 +4067,7 @@ func NewPatchGitRepoRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3764,7 +4081,7 @@ func NewPatchGitRepoRequestWithBody(server string, identifier Identifier, params queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -3774,19 +4091,8 @@ func NewPatchGitRepoRequestWithBody(server string, identifier Identifier, params return req, nil } -// NewCreateGitRepoRequest calls the generic CreateGitRepo builder with application/json body -func NewCreateGitRepoRequest(server string, identifier Identifier, params *CreateGitRepoParams, body CreateGitRepoJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateGitRepoRequestWithBody(server, identifier, params, "application/json", bodyReader) -} - -// NewCreateGitRepoRequestWithBody generates requests for CreateGitRepo with any type of body -func NewCreateGitRepoRequestWithBody(server string, identifier Identifier, params *CreateGitRepoParams, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteProjectRequest generates requests for DeleteProject +func NewDeleteProjectRequest(server string, identifier Identifier, params *DeleteProjectParams) (*http.Request, error) { var err error var pathParam0 string @@ -3801,15 +4107,15 @@ func NewCreateGitRepoRequestWithBody(server string, identifier Identifier, param return nil, err } - operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) + operationPath := fmt.Sprintf("/admin/projects/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -3825,7 +4131,7 @@ func NewCreateGitRepoRequestWithBody(server string, identifier Identifier, param } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3839,62 +4145,43 @@ func NewCreateGitRepoRequestWithBody(server string, identifier Identifier, param queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetAllSegmentsRequest generates requests for GetAllSegments -func NewGetAllSegmentsRequest(server string, params *GetAllSegmentsParams) (*http.Request, error) { +// NewGetProjectRequest generates requests for GetProject +func NewGetProjectRequest(server string, identifier Identifier, params *GetProjectParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/segments") + operationPath := fmt.Sprintf("/admin/projects/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] + operationPath = "." + operationPath } - operationURL := url.URL{ - Path: operationPath, - } - - queryURL := serverURL.ResolveReference(&operationURL) - - queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3906,7 +4193,7 @@ func NewGetAllSegmentsRequest(server string, params *GetAllSegmentsParams) (*htt } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -3918,102 +4205,6 @@ func NewGetAllSegmentsRequest(server string, params *GetAllSegmentsParams) (*htt } } - if params.PageNumber != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PageSize != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SortOrder != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.SortByField != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Name != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Identifier != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "identifier", runtime.ParamLocationQuery, *params.Identifier); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - queryURL.RawQuery = queryValues.Encode() req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -4024,35 +4215,42 @@ func NewGetAllSegmentsRequest(server string, params *GetAllSegmentsParams) (*htt return req, nil } -// NewCreateSegmentRequest calls the generic CreateSegment builder with application/json body -func NewCreateSegmentRequest(server string, params *CreateSegmentParams, body CreateSegmentJSONRequestBody) (*http.Request, error) { +// NewModifyProjectRequest calls the generic ModifyProject builder with application/json body +func NewModifyProjectRequest(server string, identifier Identifier, params *ModifyProjectParams, body ModifyProjectJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateSegmentRequestWithBody(server, params, "application/json", bodyReader) + return NewModifyProjectRequestWithBody(server, identifier, params, "application/json", bodyReader) } -// NewCreateSegmentRequestWithBody generates requests for CreateSegment with any type of body -func NewCreateSegmentRequestWithBody(server string, params *CreateSegmentParams, contentType string, body io.Reader) (*http.Request, error) { +// NewModifyProjectRequestWithBody generates requests for ModifyProject with any type of body +func NewModifyProjectRequestWithBody(server string, identifier Identifier, params *ModifyProjectParams, contentType string, body io.Reader) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/segments") + operationPath := fmt.Sprintf("/admin/projects/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -4068,7 +4266,7 @@ func NewCreateSegmentRequestWithBody(server string, params *CreateSegmentParams, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4082,7 +4280,7 @@ func NewCreateSegmentRequestWithBody(server string, params *CreateSegmentParams, queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -4092,8 +4290,8 @@ func NewCreateSegmentRequestWithBody(server string, params *CreateSegmentParams, return req, nil } -// NewDeleteSegmentRequest generates requests for DeleteSegment -func NewDeleteSegmentRequest(server string, identifier Identifier, params *DeleteSegmentParams) (*http.Request, error) { +// NewDeleteGitRepoRequest generates requests for DeleteGitRepo +func NewDeleteGitRepoRequest(server string, identifier Identifier, params *DeleteGitRepoParams) (*http.Request, error) { var err error var pathParam0 string @@ -4108,43 +4306,19 @@ func NewDeleteSegmentRequest(server string, identifier Identifier, params *Delet return nil, err } - operationPath := fmt.Sprintf("/admin/segments/%s", pathParam0) + operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) - - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4156,7 +4330,7 @@ func NewDeleteSegmentRequest(server string, identifier Identifier, params *Delet } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4178,8 +4352,8 @@ func NewDeleteSegmentRequest(server string, identifier Identifier, params *Delet return req, nil } -// NewGetSegmentRequest generates requests for GetSegment -func NewGetSegmentRequest(server string, identifier Identifier, params *GetSegmentParams) (*http.Request, error) { +// NewGetGitRepoRequest generates requests for GetGitRepo +func NewGetGitRepoRequest(server string, identifier Identifier, params *GetGitRepoParams) (*http.Request, error) { var err error var pathParam0 string @@ -4194,43 +4368,19 @@ func NewGetSegmentRequest(server string, identifier Identifier, params *GetSegme return nil, err } - operationPath := fmt.Sprintf("/admin/segments/%s", pathParam0) + operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) - - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + queryURL, err := serverURL.Parse(operationPath) + if err != nil { return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryValues := queryURL.Query() - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4242,7 +4392,7 @@ func NewGetSegmentRequest(server string, identifier Identifier, params *GetSegme } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4264,19 +4414,19 @@ func NewGetSegmentRequest(server string, identifier Identifier, params *GetSegme return req, nil } -// NewPatchSegmentRequest calls the generic PatchSegment builder with application/json body -func NewPatchSegmentRequest(server string, identifier Identifier, params *PatchSegmentParams, body PatchSegmentJSONRequestBody) (*http.Request, error) { +// NewPatchGitRepoRequest calls the generic PatchGitRepo builder with application/json body +func NewPatchGitRepoRequest(server string, identifier Identifier, params *PatchGitRepoParams, body PatchGitRepoJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewPatchSegmentRequestWithBody(server, identifier, params, "application/json", bodyReader) + return NewPatchGitRepoRequestWithBody(server, identifier, params, "application/json", bodyReader) } -// NewPatchSegmentRequestWithBody generates requests for PatchSegment with any type of body -func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params *PatchSegmentParams, contentType string, body io.Reader) (*http.Request, error) { +// NewPatchGitRepoRequestWithBody generates requests for PatchGitRepo with any type of body +func NewPatchGitRepoRequestWithBody(server string, identifier Identifier, params *PatchGitRepoParams, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -4291,15 +4441,15 @@ func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params return nil, err } - operationPath := fmt.Sprintf("/admin/segments/%s", pathParam0) + operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -4315,7 +4465,7 @@ func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4327,7 +4477,58 @@ func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewCreateGitRepoRequest calls the generic CreateGitRepo builder with application/json body +func NewCreateGitRepoRequest(server string, identifier Identifier, params *CreateGitRepoParams, body CreateGitRepoJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateGitRepoRequestWithBody(server, identifier, params, "application/json", bodyReader) +} + +// NewCreateGitRepoRequestWithBody generates requests for CreateGitRepo with any type of body +func NewCreateGitRepoRequestWithBody(server string, identifier Identifier, params *CreateGitRepoParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/projects/%s/git_repo", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4339,7 +4540,7 @@ func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4353,7 +4554,7 @@ func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("PATCH", queryURL.String(), body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } @@ -4363,31 +4564,24 @@ func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params return req, nil } -// NewGetAvailableFlagsForSegmentRequest generates requests for GetAvailableFlagsForSegment -func NewGetAvailableFlagsForSegmentRequest(server string, identifier Identifier, params *GetAvailableFlagsForSegmentParams) (*http.Request, error) { +// NewGetAllSegmentsRequest generates requests for GetAllSegments +func NewGetAllSegmentsRequest(server string, params *GetAllSegmentsParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/segments/%s/available_flags", pathParam0) + operationPath := fmt.Sprintf("/admin/segments") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -4403,7 +4597,7 @@ func NewGetAvailableFlagsForSegmentRequest(server string, identifier Identifier, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4415,7 +4609,7 @@ func NewGetAvailableFlagsForSegmentRequest(server string, identifier Identifier, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4427,7 +4621,7 @@ func NewGetAvailableFlagsForSegmentRequest(server string, identifier Identifier, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4503,9 +4697,25 @@ func NewGetAvailableFlagsForSegmentRequest(server string, identifier Identifier, } - if params.FlagNameIdentifier != nil { + if params.Name != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "flagNameIdentifier", runtime.ParamLocationQuery, *params.FlagNameIdentifier); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "name", runtime.ParamLocationQuery, *params.Name); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Identifier != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "identifier", runtime.ParamLocationQuery, *params.Identifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4529,8 +4739,76 @@ func NewGetAvailableFlagsForSegmentRequest(server string, identifier Identifier, return req, nil } -// NewGetSegmentFlagsRequest generates requests for GetSegmentFlags -func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *GetSegmentFlagsParams) (*http.Request, error) { +// NewCreateSegmentRequest calls the generic CreateSegment builder with application/json body +func NewCreateSegmentRequest(server string, params *CreateSegmentParams, body CreateSegmentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateSegmentRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewCreateSegmentRequestWithBody generates requests for CreateSegment with any type of body +func NewCreateSegmentRequestWithBody(server string, params *CreateSegmentParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/segments") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteSegmentRequest generates requests for DeleteSegment +func NewDeleteSegmentRequest(server string, identifier Identifier, params *DeleteSegmentParams) (*http.Request, error) { var err error var pathParam0 string @@ -4545,15 +4823,15 @@ func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *Get return nil, err } - operationPath := fmt.Sprintf("/admin/segments/%s/flags", pathParam0) + operationPath := fmt.Sprintf("/admin/segments/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -4569,7 +4847,7 @@ func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *Get } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4581,7 +4859,7 @@ func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *Get } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4593,7 +4871,7 @@ func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *Get } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4607,7 +4885,7 @@ func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *Get queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } @@ -4615,24 +4893,31 @@ func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *Get return req, nil } -// NewGetAllTargetsRequest generates requests for GetAllTargets -func NewGetAllTargetsRequest(server string, params *GetAllTargetsParams) (*http.Request, error) { +// NewGetSegmentRequest generates requests for GetSegment +func NewGetSegmentRequest(server string, identifier Identifier, params *GetSegmentParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/targets") + operationPath := fmt.Sprintf("/admin/segments/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -4648,7 +4933,7 @@ func NewGetAllTargetsRequest(server string, params *GetAllTargetsParams) (*http. } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4660,7 +4945,7 @@ func NewGetAllTargetsRequest(server string, params *GetAllTargetsParams) (*http. } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4672,7 +4957,7 @@ func NewGetAllTargetsRequest(server string, params *GetAllTargetsParams) (*http. } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4684,199 +4969,53 @@ func NewGetAllTargetsRequest(server string, params *GetAllTargetsParams) (*http. } } - if params.PageNumber != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + queryURL.RawQuery = queryValues.Encode() + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err } - if params.PageSize != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} +// NewPatchSegmentRequest calls the generic PatchSegment builder with application/json body +func NewPatchSegmentRequest(server string, identifier Identifier, params *PatchSegmentParams, body PatchSegmentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err } + bodyReader = bytes.NewReader(buf) + return NewPatchSegmentRequestWithBody(server, identifier, params, "application/json", bodyReader) +} - if params.SortOrder != nil { +// NewPatchSegmentRequestWithBody generates requests for PatchSegment with any type of body +func NewPatchSegmentRequestWithBody(server string, identifier Identifier, params *PatchSegmentParams, contentType string, body io.Reader) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + var pathParam0 string + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + if err != nil { + return nil, err } - if params.SortByField != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.TargetName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targetName", runtime.ParamLocationQuery, *params.TargetName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.TargetIdentifier != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targetIdentifier", runtime.ParamLocationQuery, *params.TargetIdentifier); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateTargetRequest calls the generic CreateTarget builder with application/json body -func NewCreateTargetRequest(server string, params *CreateTargetParams, body CreateTargetJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateTargetRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewCreateTargetRequestWithBody generates requests for CreateTarget with any type of body -func NewCreateTargetRequestWithBody(server string, params *CreateTargetParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/targets") + operationPath := fmt.Sprintf("/admin/segments/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, - } - - queryURL := serverURL.ResolveReference(&operationURL) - - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err + operationPath = "." + operationPath } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetTargetsAndSegmentsInfoRequest generates requests for GetTargetsAndSegmentsInfo -func NewGetTargetsAndSegmentsInfoRequest(server string, params *GetTargetsAndSegmentsInfoParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/targets-segments-info/") - if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, - } - - queryURL := serverURL.ResolveReference(&operationURL) - queryValues := queryURL.Query() if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { @@ -4891,7 +5030,7 @@ func NewGetTargetsAndSegmentsInfoRequest(server string, params *GetTargetsAndSeg } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4903,7 +5042,7 @@ func NewGetTargetsAndSegmentsInfoRequest(server string, params *GetTargetsAndSeg } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4915,7 +5054,7 @@ func NewGetTargetsAndSegmentsInfoRequest(server string, params *GetTargetsAndSeg } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -4927,66 +5066,43 @@ func NewGetTargetsAndSegmentsInfoRequest(server string, params *GetTargetsAndSeg } } - if params.Targets != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targets", runtime.ParamLocationQuery, *params.Targets); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.TargetGroups != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targetGroups", runtime.ParamLocationQuery, *params.TargetGroups); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - queryURL.RawQuery = queryValues.Encode() - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("PATCH", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewGetTargetsAndSegmentsRequest generates requests for GetTargetsAndSegments -func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegmentsParams) (*http.Request, error) { +// NewGetAvailableFlagsForSegmentRequest generates requests for GetAvailableFlagsForSegment +func NewGetAvailableFlagsForSegmentRequest(server string, identifier Identifier, params *GetAvailableFlagsForSegmentParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/targets-segments/") + operationPath := fmt.Sprintf("/admin/segments/%s/available_flags", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5002,7 +5118,7 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5014,7 +5130,7 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5026,7 +5142,7 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5038,25 +5154,9 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment } } - if params.TsIdentifier != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tsIdentifier", runtime.ParamLocationQuery, *params.TsIdentifier); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.TsName != nil { + if params.PageNumber != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tsName", runtime.ParamLocationQuery, *params.TsName); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5070,9 +5170,9 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment } - if params.SortByField != nil { + if params.PageSize != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5102,9 +5202,9 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment } - if params.PageNumber != nil { + if params.SortByField != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5118,9 +5218,9 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment } - if params.PageSize != nil { + if params.FlagNameIdentifier != nil { - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "flagNameIdentifier", runtime.ParamLocationQuery, *params.FlagNameIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5144,24 +5244,31 @@ func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegment return req, nil } -// NewGetAllTargetAttributesRequest generates requests for GetAllTargetAttributes -func NewGetAllTargetAttributesRequest(server string, params *GetAllTargetAttributesParams) (*http.Request, error) { +// NewGetSegmentFlagsRequest generates requests for GetSegmentFlags +func NewGetSegmentFlagsRequest(server string, identifier Identifier, params *GetSegmentFlagsParams) (*http.Request, error) { var err error + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "identifier", runtime.ParamLocationPath, identifier) + if err != nil { + return nil, err + } + serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/admin/targets/attributes") + operationPath := fmt.Sprintf("/admin/segments/%s/flags", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5177,7 +5284,7 @@ func NewGetAllTargetAttributesRequest(server string, params *GetAllTargetAttribu } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5189,7 +5296,7 @@ func NewGetAllTargetAttributesRequest(server string, params *GetAllTargetAttribu } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5201,7 +5308,7 @@ func NewGetAllTargetAttributesRequest(server string, params *GetAllTargetAttribu } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5223,8 +5330,8 @@ func NewGetAllTargetAttributesRequest(server string, params *GetAllTargetAttribu return req, nil } -// NewUploadTargetsRequestWithBody generates requests for UploadTargets with any type of body -func NewUploadTargetsRequestWithBody(server string, params *UploadTargetsParams, contentType string, body io.Reader) (*http.Request, error) { +// NewGetAllTargetsRequest generates requests for GetAllTargets +func NewGetAllTargetsRequest(server string, params *GetAllTargetsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5232,15 +5339,15 @@ func NewUploadTargetsRequestWithBody(server string, params *UploadTargetsParams, return nil, err } - operationPath := fmt.Sprintf("/admin/targets/upload") + operationPath := fmt.Sprintf("/admin/targets") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5256,7 +5363,7 @@ func NewUploadTargetsRequestWithBody(server string, params *UploadTargetsParams, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5268,7 +5375,7 @@ func NewUploadTargetsRequestWithBody(server string, params *UploadTargetsParams, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5280,7 +5387,7 @@ func NewUploadTargetsRequestWithBody(server string, params *UploadTargetsParams, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5292,17 +5399,625 @@ func NewUploadTargetsRequestWithBody(server string, params *UploadTargetsParams, } } - queryURL.RawQuery = queryValues.Encode() + if params.PageNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err } - req.Header.Add("Content-Type", contentType) + if params.PageSize != nil { - return req, nil -} + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortOrder != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortByField != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.TargetName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targetName", runtime.ParamLocationQuery, *params.TargetName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.TargetIdentifier != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targetIdentifier", runtime.ParamLocationQuery, *params.TargetIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateTargetRequest calls the generic CreateTarget builder with application/json body +func NewCreateTargetRequest(server string, params *CreateTargetParams, body CreateTargetJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateTargetRequestWithBody(server, params, "application/json", bodyReader) +} + +// NewCreateTargetRequestWithBody generates requests for CreateTarget with any type of body +func NewCreateTargetRequestWithBody(server string, params *CreateTargetParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/targets") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTargetsAndSegmentsInfoRequest generates requests for GetTargetsAndSegmentsInfo +func NewGetTargetsAndSegmentsInfoRequest(server string, params *GetTargetsAndSegmentsInfoParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/targets-segments-info/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.Targets != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targets", runtime.ParamLocationQuery, *params.Targets); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.TargetGroups != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "targetGroups", runtime.ParamLocationQuery, *params.TargetGroups); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetTargetsAndSegmentsRequest generates requests for GetTargetsAndSegments +func NewGetTargetsAndSegmentsRequest(server string, params *GetTargetsAndSegmentsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/targets-segments/") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.TsIdentifier != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tsIdentifier", runtime.ParamLocationQuery, *params.TsIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.TsName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tsName", runtime.ParamLocationQuery, *params.TsName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortByField != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortByField", runtime.ParamLocationQuery, *params.SortByField); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SortOrder != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sortOrder", runtime.ParamLocationQuery, *params.SortOrder); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageNumber != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageNumber", runtime.ParamLocationQuery, *params.PageNumber); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PageSize != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "pageSize", runtime.ParamLocationQuery, *params.PageSize); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetAllTargetAttributesRequest generates requests for GetAllTargetAttributes +func NewGetAllTargetAttributesRequest(server string, params *GetAllTargetAttributesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/targets/attributes") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewUploadTargetsRequestWithBody generates requests for UploadTargets with any type of body +func NewUploadTargetsRequestWithBody(server string, params *UploadTargetsParams, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/admin/targets/upload") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} // NewDeleteTargetRequest generates requests for DeleteTarget func NewDeleteTargetRequest(server string, identifier Identifier, params *DeleteTargetParams) (*http.Request, error) { @@ -5322,13 +6037,13 @@ func NewDeleteTargetRequest(server string, identifier Identifier, params *Delete operationPath := fmt.Sprintf("/admin/targets/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5344,7 +6059,7 @@ func NewDeleteTargetRequest(server string, identifier Identifier, params *Delete } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5356,7 +6071,7 @@ func NewDeleteTargetRequest(server string, identifier Identifier, params *Delete } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5368,7 +6083,7 @@ func NewDeleteTargetRequest(server string, identifier Identifier, params *Delete } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5408,13 +6123,13 @@ func NewGetTargetRequest(server string, identifier Identifier, params *GetTarget operationPath := fmt.Sprintf("/admin/targets/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5430,7 +6145,7 @@ func NewGetTargetRequest(server string, identifier Identifier, params *GetTarget } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5442,7 +6157,7 @@ func NewGetTargetRequest(server string, identifier Identifier, params *GetTarget } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5454,7 +6169,7 @@ func NewGetTargetRequest(server string, identifier Identifier, params *GetTarget } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5505,13 +6220,13 @@ func NewPatchTargetRequestWithBody(server string, identifier Identifier, params operationPath := fmt.Sprintf("/admin/targets/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5527,7 +6242,7 @@ func NewPatchTargetRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5539,7 +6254,7 @@ func NewPatchTargetRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5551,7 +6266,7 @@ func NewPatchTargetRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5604,13 +6319,13 @@ func NewModifyTargetRequestWithBody(server string, identifier Identifier, params operationPath := fmt.Sprintf("/admin/targets/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5626,7 +6341,7 @@ func NewModifyTargetRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5638,7 +6353,7 @@ func NewModifyTargetRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5650,7 +6365,7 @@ func NewModifyTargetRequestWithBody(server string, identifier Identifier, params } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5692,13 +6407,13 @@ func NewGetTargetAvailableSegmentsRequest(server string, identifier Identifier, operationPath := fmt.Sprintf("/admin/targets/%s/available_segments", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5714,7 +6429,7 @@ func NewGetTargetAvailableSegmentsRequest(server string, identifier Identifier, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5726,7 +6441,7 @@ func NewGetTargetAvailableSegmentsRequest(server string, identifier Identifier, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5738,7 +6453,7 @@ func NewGetTargetAvailableSegmentsRequest(server string, identifier Identifier, } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5858,13 +6573,13 @@ func NewGetTargetSegmentsRequest(server string, identifier Identifier, params *G operationPath := fmt.Sprintf("/admin/targets/%s/segments", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -5880,7 +6595,19 @@ func NewGetTargetSegmentsRequest(server string, identifier Identifier, params *G } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "org", runtime.ParamLocationQuery, params.Org); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "orgIdentifier", runtime.ParamLocationQuery, params.OrgIdentifier); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "projectIdentifier", runtime.ParamLocationQuery, params.ProjectIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5892,7 +6619,7 @@ func NewGetTargetSegmentsRequest(server string, identifier Identifier, params *G } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "project", runtime.ParamLocationQuery, params.Project); err != nil { + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environmentIdentifier", runtime.ParamLocationQuery, params.EnvironmentIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5904,7 +6631,38 @@ func NewGetTargetSegmentsRequest(server string, identifier Identifier, params *G } } - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "environment", runtime.ParamLocationQuery, params.Environment); err != nil { + queryURL.RawQuery = queryValues.Encode() + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetLicenseUsageRequest generates requests for GetLicenseUsage +func NewGetLicenseUsageRequest(server string, params *GetLicenseUsageParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/usage") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "accountIdentifier", runtime.ParamLocationQuery, params.AccountIdentifier); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5916,6 +6674,22 @@ func NewGetTargetSegmentsRequest(server string, identifier Identifier, params *G } } + if params.Timestamp != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "timestamp", runtime.ParamLocationQuery, *params.Timestamp); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -5972,18 +6746,18 @@ type ClientWithResponsesInterface interface { // GetAllAPIKeys request GetAllAPIKeysWithResponse(ctx context.Context, params *GetAllAPIKeysParams, reqEditors ...RequestEditorFn) (*GetAllAPIKeysResponse, error) - // AddAPIKey request with any body + // AddAPIKey request with any body AddAPIKeyWithBodyWithResponse(ctx context.Context, params *AddAPIKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddAPIKeyResponse, error) AddAPIKeyWithResponse(ctx context.Context, params *AddAPIKeyParams, body AddAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AddAPIKeyResponse, error) - // DeleteApiKey request - DeleteApiKeyWithResponse(ctx context.Context, identifier Identifier, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) + // DeleteAPIKey request + DeleteAPIKeyWithResponse(ctx context.Context, identifier Identifier, params *DeleteAPIKeyParams, reqEditors ...RequestEditorFn) (*DeleteAPIKeyResponse, error) // GetAPIKey request GetAPIKeyWithResponse(ctx context.Context, identifier Identifier, params *GetAPIKeyParams, reqEditors ...RequestEditorFn) (*GetAPIKeyResponse, error) - // UpdateAPIKey request with any body + // UpdateAPIKey request with any body UpdateAPIKeyWithBodyWithResponse(ctx context.Context, identifier Identifier, params *UpdateAPIKeyParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAPIKeyResponse, error) UpdateAPIKeyWithResponse(ctx context.Context, identifier Identifier, params *UpdateAPIKeyParams, body UpdateAPIKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAPIKeyResponse, error) @@ -5994,7 +6768,7 @@ type ClientWithResponsesInterface interface { // GetAllEnvironments request GetAllEnvironmentsWithResponse(ctx context.Context, params *GetAllEnvironmentsParams, reqEditors ...RequestEditorFn) (*GetAllEnvironmentsResponse, error) - // CreateEnvironment request with any body + // CreateEnvironment request with any body CreateEnvironmentWithBodyWithResponse(ctx context.Context, params *CreateEnvironmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateEnvironmentResponse, error) CreateEnvironmentWithResponse(ctx context.Context, params *CreateEnvironmentParams, body CreateEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateEnvironmentResponse, error) @@ -6005,7 +6779,7 @@ type ClientWithResponsesInterface interface { // GetEnvironment request GetEnvironmentWithResponse(ctx context.Context, identifier Identifier, params *GetEnvironmentParams, reqEditors ...RequestEditorFn) (*GetEnvironmentResponse, error) - // ModifyEnvironment request with any body + // ModifyEnvironment request with any body ModifyEnvironmentWithBodyWithResponse(ctx context.Context, identifier Identifier, params *ModifyEnvironmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModifyEnvironmentResponse, error) ModifyEnvironmentWithResponse(ctx context.Context, identifier Identifier, params *ModifyEnvironmentParams, body ModifyEnvironmentJSONRequestBody, reqEditors ...RequestEditorFn) (*ModifyEnvironmentResponse, error) @@ -6013,18 +6787,21 @@ type ClientWithResponsesInterface interface { // GetAllFeatures request GetAllFeaturesWithResponse(ctx context.Context, params *GetAllFeaturesParams, reqEditors ...RequestEditorFn) (*GetAllFeaturesResponse, error) - // CreateFeatureFlag request with any body + // CreateFeatureFlag request with any body CreateFeatureFlagWithBodyWithResponse(ctx context.Context, params *CreateFeatureFlagParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFeatureFlagResponse, error) CreateFeatureFlagWithResponse(ctx context.Context, params *CreateFeatureFlagParams, body CreateFeatureFlagJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFeatureFlagResponse, error) + // GetAvailableFeaturePipelines request + GetAvailableFeaturePipelinesWithResponse(ctx context.Context, params *GetAvailableFeaturePipelinesParams, reqEditors ...RequestEditorFn) (*GetAvailableFeaturePipelinesResponse, error) + // GetFeatureMetrics request GetFeatureMetricsWithResponse(ctx context.Context, params *GetFeatureMetricsParams, reqEditors ...RequestEditorFn) (*GetFeatureMetricsResponse, error) // GetFlagsYaml request GetFlagsYamlWithResponse(ctx context.Context, params *GetFlagsYamlParams, reqEditors ...RequestEditorFn) (*GetFlagsYamlResponse, error) - // UpdateFlagsYaml request with any body + // UpdateFlagsYaml request with any body UpdateFlagsYamlWithBodyWithResponse(ctx context.Context, params *UpdateFlagsYamlParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFlagsYamlResponse, error) UpdateFlagsYamlWithResponse(ctx context.Context, params *UpdateFlagsYamlParams, body UpdateFlagsYamlJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFlagsYamlResponse, error) @@ -6035,7 +6812,7 @@ type ClientWithResponsesInterface interface { // GetFeatureFlag request GetFeatureFlagWithResponse(ctx context.Context, identifier Identifier, params *GetFeatureFlagParams, reqEditors ...RequestEditorFn) (*GetFeatureFlagResponse, error) - // PatchFeature request with any body + // PatchFeature request with any body PatchFeatureWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchFeatureParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchFeatureResponse, error) PatchFeatureWithResponse(ctx context.Context, identifier Identifier, params *PatchFeatureParams, body PatchFeatureJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchFeatureResponse, error) @@ -6043,13 +6820,29 @@ type ClientWithResponsesInterface interface { // GetFeatureEvaluations request GetFeatureEvaluationsWithResponse(ctx context.Context, identifier Identifier, params *GetFeatureEvaluationsParams, reqEditors ...RequestEditorFn) (*GetFeatureEvaluationsResponse, error) - // GetOSById request - GetOSByIdWithResponse(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*GetOSByIdResponse, error) + // DeleteFeaturePipeline request + DeleteFeaturePipelineWithResponse(ctx context.Context, identifier Identifier, params *DeleteFeaturePipelineParams, reqEditors ...RequestEditorFn) (*DeleteFeaturePipelineResponse, error) + + // GetFeaturePipeline request + GetFeaturePipelineWithResponse(ctx context.Context, identifier Identifier, params *GetFeaturePipelineParams, reqEditors ...RequestEditorFn) (*GetFeaturePipelineResponse, error) + + // PatchFeaturePipeline request with any body + PatchFeaturePipelineWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchFeaturePipelineResponse, error) + + PatchFeaturePipelineWithResponse(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, body PatchFeaturePipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchFeaturePipelineResponse, error) + + // CreateFlagPipeline request with any body + CreateFlagPipelineWithBodyWithResponse(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFlagPipelineResponse, error) + + CreateFlagPipelineWithResponse(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, body CreateFlagPipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFlagPipelineResponse, error) + + // GetOSByID request + GetOSByIDWithResponse(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*GetOSByIDResponse, error) // GetAllProjects request GetAllProjectsWithResponse(ctx context.Context, params *GetAllProjectsParams, reqEditors ...RequestEditorFn) (*GetAllProjectsResponse, error) - // CreateProject request with any body + // CreateProject request with any body CreateProjectWithBodyWithResponse(ctx context.Context, params *CreateProjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) CreateProjectWithResponse(ctx context.Context, params *CreateProjectParams, body CreateProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateProjectResponse, error) @@ -6060,7 +6853,7 @@ type ClientWithResponsesInterface interface { // GetProject request GetProjectWithResponse(ctx context.Context, identifier Identifier, params *GetProjectParams, reqEditors ...RequestEditorFn) (*GetProjectResponse, error) - // ModifyProject request with any body + // ModifyProject request with any body ModifyProjectWithBodyWithResponse(ctx context.Context, identifier Identifier, params *ModifyProjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModifyProjectResponse, error) ModifyProjectWithResponse(ctx context.Context, identifier Identifier, params *ModifyProjectParams, body ModifyProjectJSONRequestBody, reqEditors ...RequestEditorFn) (*ModifyProjectResponse, error) @@ -6071,12 +6864,12 @@ type ClientWithResponsesInterface interface { // GetGitRepo request GetGitRepoWithResponse(ctx context.Context, identifier Identifier, params *GetGitRepoParams, reqEditors ...RequestEditorFn) (*GetGitRepoResponse, error) - // PatchGitRepo request with any body + // PatchGitRepo request with any body PatchGitRepoWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchGitRepoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchGitRepoResponse, error) PatchGitRepoWithResponse(ctx context.Context, identifier Identifier, params *PatchGitRepoParams, body PatchGitRepoJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchGitRepoResponse, error) - // CreateGitRepo request with any body + // CreateGitRepo request with any body CreateGitRepoWithBodyWithResponse(ctx context.Context, identifier Identifier, params *CreateGitRepoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGitRepoResponse, error) CreateGitRepoWithResponse(ctx context.Context, identifier Identifier, params *CreateGitRepoParams, body CreateGitRepoJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGitRepoResponse, error) @@ -6084,7 +6877,7 @@ type ClientWithResponsesInterface interface { // GetAllSegments request GetAllSegmentsWithResponse(ctx context.Context, params *GetAllSegmentsParams, reqEditors ...RequestEditorFn) (*GetAllSegmentsResponse, error) - // CreateSegment request with any body + // CreateSegment request with any body CreateSegmentWithBodyWithResponse(ctx context.Context, params *CreateSegmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateSegmentResponse, error) CreateSegmentWithResponse(ctx context.Context, params *CreateSegmentParams, body CreateSegmentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSegmentResponse, error) @@ -6095,7 +6888,7 @@ type ClientWithResponsesInterface interface { // GetSegment request GetSegmentWithResponse(ctx context.Context, identifier Identifier, params *GetSegmentParams, reqEditors ...RequestEditorFn) (*GetSegmentResponse, error) - // PatchSegment request with any body + // PatchSegment request with any body PatchSegmentWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchSegmentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSegmentResponse, error) PatchSegmentWithResponse(ctx context.Context, identifier Identifier, params *PatchSegmentParams, body PatchSegmentJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSegmentResponse, error) @@ -6109,7 +6902,7 @@ type ClientWithResponsesInterface interface { // GetAllTargets request GetAllTargetsWithResponse(ctx context.Context, params *GetAllTargetsParams, reqEditors ...RequestEditorFn) (*GetAllTargetsResponse, error) - // CreateTarget request with any body + // CreateTarget request with any body CreateTargetWithBodyWithResponse(ctx context.Context, params *CreateTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTargetResponse, error) CreateTargetWithResponse(ctx context.Context, params *CreateTargetParams, body CreateTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTargetResponse, error) @@ -6123,7 +6916,7 @@ type ClientWithResponsesInterface interface { // GetAllTargetAttributes request GetAllTargetAttributesWithResponse(ctx context.Context, params *GetAllTargetAttributesParams, reqEditors ...RequestEditorFn) (*GetAllTargetAttributesResponse, error) - // UploadTargets request with any body + // UploadTargets request with any body UploadTargetsWithBodyWithResponse(ctx context.Context, params *UploadTargetsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadTargetsResponse, error) // DeleteTarget request @@ -6132,12 +6925,12 @@ type ClientWithResponsesInterface interface { // GetTarget request GetTargetWithResponse(ctx context.Context, identifier Identifier, params *GetTargetParams, reqEditors ...RequestEditorFn) (*GetTargetResponse, error) - // PatchTarget request with any body + // PatchTarget request with any body PatchTargetWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTargetResponse, error) PatchTargetWithResponse(ctx context.Context, identifier Identifier, params *PatchTargetParams, body PatchTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTargetResponse, error) - // ModifyTarget request with any body + // ModifyTarget request with any body ModifyTargetWithBodyWithResponse(ctx context.Context, identifier Identifier, params *ModifyTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModifyTargetResponse, error) ModifyTargetWithResponse(ctx context.Context, identifier Identifier, params *ModifyTargetParams, body ModifyTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*ModifyTargetResponse, error) @@ -6147,6 +6940,9 @@ type ClientWithResponsesInterface interface { // GetTargetSegments request GetTargetSegmentsWithResponse(ctx context.Context, identifier Identifier, params *GetTargetSegmentsParams, reqEditors ...RequestEditorFn) (*GetTargetSegmentsResponse, error) + + // GetLicenseUsage request + GetLicenseUsageWithResponse(ctx context.Context, params *GetLicenseUsageParams, reqEditors ...RequestEditorFn) (*GetLicenseUsageResponse, error) } type GetAllAPIKeysResponse struct { @@ -6202,7 +6998,7 @@ func (r AddAPIKeyResponse) StatusCode() int { return 0 } -type DeleteApiKeyResponse struct { +type DeleteAPIKeyResponse struct { Body []byte HTTPResponse *http.Response JSON401 *Error @@ -6212,7 +7008,7 @@ type DeleteApiKeyResponse struct { } // Status returns HTTPResponse.Status -func (r DeleteApiKeyResponse) Status() string { +func (r DeleteAPIKeyResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6220,7 +7016,7 @@ func (r DeleteApiKeyResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteApiKeyResponse) StatusCode() int { +func (r DeleteAPIKeyResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6283,10 +7079,14 @@ type GetAuditByParamsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *AuditTrails `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of Audit Trail events + Data *AuditTrails `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } JSON401 *Error JSON403 *Error @@ -6313,10 +7113,14 @@ type GetAllEnvironmentsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - CorrelationId string `json:"correlationId"` - Data Environments `json:"data"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status Status `json:"status"` + CorrelationId string `json:"correlationId"` + + // A list of Environments + Data Environments `json:"data"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status Status `json:"status"` } JSON401 *Error JSON403 *Error @@ -6395,10 +7199,14 @@ type GetEnvironmentResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Environment `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // Environment Response + Data *Environment `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } JSON401 *Error JSON403 *Error @@ -6477,6 +7285,7 @@ func (r GetAllFeaturesResponse) StatusCode() int { type CreateFeatureFlagResponse struct { Body []byte HTTPResponse *http.Response + JSON201 *FeatureResponseMetadata JSON400 *Error JSON401 *Error JSON403 *Error @@ -6501,6 +7310,32 @@ func (r CreateFeatureFlagResponse) StatusCode() int { return 0 } +type GetAvailableFeaturePipelinesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *FeatureAvailablePipelines + JSON401 *Error + JSON403 *Error + JSON404 *Error + JSON500 *Error +} + +// Status returns HTTPResponse.Status +func (r GetAvailableFeaturePipelinesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAvailableFeaturePipelinesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type GetFeatureMetricsResponse struct { Body []byte HTTPResponse *http.Response @@ -6634,7 +7469,7 @@ func (r GetFeatureFlagResponse) StatusCode() int { type PatchFeatureResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *Feature + JSON200 *FeatureResponseMetadata JSON400 *Error JSON401 *Error JSON403 *Error @@ -6671,7 +7506,110 @@ type GetFeatureEvaluationsResponse struct { } // Status returns HTTPResponse.Status -func (r GetFeatureEvaluationsResponse) Status() string { +func (r GetFeatureEvaluationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetFeatureEvaluationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteFeaturePipelineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON401 *Error + JSON403 *Error + JSON404 *Error + JSON500 *Error +} + +// Status returns HTTPResponse.Status +func (r DeleteFeaturePipelineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteFeaturePipelineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetFeaturePipelineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *FeaturePipelineResp + JSON401 *Error + JSON403 *Error + JSON404 *Error + JSON500 *Error +} + +// Status returns HTTPResponse.Status +func (r GetFeaturePipelineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetFeaturePipelineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchFeaturePipelineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *Error + JSON401 *Error + JSON403 *Error + JSON404 *Error + JSON500 *Error +} + +// Status returns HTTPResponse.Status +func (r PatchFeaturePipelineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchFeaturePipelineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type CreateFlagPipelineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON400 *Error + JSON401 *Error + JSON403 *Error + JSON409 *Error + JSON500 *Error +} + +// Status returns HTTPResponse.Status +func (r CreateFlagPipelineResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6679,21 +7617,25 @@ func (r GetFeatureEvaluationsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetFeatureEvaluationsResponse) StatusCode() int { +func (r CreateFlagPipelineResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetOSByIdResponse struct { +type GetOSByIDResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *ObjectSnapshots `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of Object Snapshots + Data *ObjectSnapshots `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } JSON401 *Error JSON403 *Error @@ -6702,7 +7644,7 @@ type GetOSByIdResponse struct { } // Status returns HTTPResponse.Status -func (r GetOSByIdResponse) Status() string { +func (r GetOSByIDResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6710,7 +7652,7 @@ func (r GetOSByIdResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetOSByIdResponse) StatusCode() int { +func (r GetOSByIDResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6721,10 +7663,14 @@ type GetAllProjectsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Projects `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of projects + Data *Projects `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } JSON401 *Error JSON403 *Error @@ -6803,10 +7749,14 @@ type GetProjectResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Project `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A project response + Data *Project `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } JSON401 *Error JSON403 *Error @@ -7457,6 +8407,28 @@ func (r GetTargetSegmentsResponse) StatusCode() int { return 0 } +type GetLicenseUsageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CFLicenseUsageDTO +} + +// Status returns HTTPResponse.Status +func (r GetLicenseUsageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetLicenseUsageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + // GetAllAPIKeysWithResponse request returning *GetAllAPIKeysResponse func (c *ClientWithResponses) GetAllAPIKeysWithResponse(ctx context.Context, params *GetAllAPIKeysParams, reqEditors ...RequestEditorFn) (*GetAllAPIKeysResponse, error) { rsp, err := c.GetAllAPIKeys(ctx, params, reqEditors...) @@ -7483,13 +8455,13 @@ func (c *ClientWithResponses) AddAPIKeyWithResponse(ctx context.Context, params return ParseAddAPIKeyResponse(rsp) } -// DeleteApiKeyWithResponse request returning *DeleteApiKeyResponse -func (c *ClientWithResponses) DeleteApiKeyWithResponse(ctx context.Context, identifier Identifier, params *DeleteApiKeyParams, reqEditors ...RequestEditorFn) (*DeleteApiKeyResponse, error) { - rsp, err := c.DeleteApiKey(ctx, identifier, params, reqEditors...) +// DeleteAPIKeyWithResponse request returning *DeleteAPIKeyResponse +func (c *ClientWithResponses) DeleteAPIKeyWithResponse(ctx context.Context, identifier Identifier, params *DeleteAPIKeyParams, reqEditors ...RequestEditorFn) (*DeleteAPIKeyResponse, error) { + rsp, err := c.DeleteAPIKey(ctx, identifier, params, reqEditors...) if err != nil { return nil, err } - return ParseDeleteApiKeyResponse(rsp) + return ParseDeleteAPIKeyResponse(rsp) } // GetAPIKeyWithResponse request returning *GetAPIKeyResponse @@ -7614,6 +8586,15 @@ func (c *ClientWithResponses) CreateFeatureFlagWithResponse(ctx context.Context, return ParseCreateFeatureFlagResponse(rsp) } +// GetAvailableFeaturePipelinesWithResponse request returning *GetAvailableFeaturePipelinesResponse +func (c *ClientWithResponses) GetAvailableFeaturePipelinesWithResponse(ctx context.Context, params *GetAvailableFeaturePipelinesParams, reqEditors ...RequestEditorFn) (*GetAvailableFeaturePipelinesResponse, error) { + rsp, err := c.GetAvailableFeaturePipelines(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAvailableFeaturePipelinesResponse(rsp) +} + // GetFeatureMetricsWithResponse request returning *GetFeatureMetricsResponse func (c *ClientWithResponses) GetFeatureMetricsWithResponse(ctx context.Context, params *GetFeatureMetricsParams, reqEditors ...RequestEditorFn) (*GetFeatureMetricsResponse, error) { rsp, err := c.GetFeatureMetrics(ctx, params, reqEditors...) @@ -7693,13 +8674,65 @@ func (c *ClientWithResponses) GetFeatureEvaluationsWithResponse(ctx context.Cont return ParseGetFeatureEvaluationsResponse(rsp) } -// GetOSByIdWithResponse request returning *GetOSByIdResponse -func (c *ClientWithResponses) GetOSByIdWithResponse(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*GetOSByIdResponse, error) { - rsp, err := c.GetOSById(ctx, identifiers, reqEditors...) +// DeleteFeaturePipelineWithResponse request returning *DeleteFeaturePipelineResponse +func (c *ClientWithResponses) DeleteFeaturePipelineWithResponse(ctx context.Context, identifier Identifier, params *DeleteFeaturePipelineParams, reqEditors ...RequestEditorFn) (*DeleteFeaturePipelineResponse, error) { + rsp, err := c.DeleteFeaturePipeline(ctx, identifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteFeaturePipelineResponse(rsp) +} + +// GetFeaturePipelineWithResponse request returning *GetFeaturePipelineResponse +func (c *ClientWithResponses) GetFeaturePipelineWithResponse(ctx context.Context, identifier Identifier, params *GetFeaturePipelineParams, reqEditors ...RequestEditorFn) (*GetFeaturePipelineResponse, error) { + rsp, err := c.GetFeaturePipeline(ctx, identifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetFeaturePipelineResponse(rsp) +} + +// PatchFeaturePipelineWithBodyWithResponse request with arbitrary body returning *PatchFeaturePipelineResponse +func (c *ClientWithResponses) PatchFeaturePipelineWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchFeaturePipelineResponse, error) { + rsp, err := c.PatchFeaturePipelineWithBody(ctx, identifier, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchFeaturePipelineResponse(rsp) +} + +func (c *ClientWithResponses) PatchFeaturePipelineWithResponse(ctx context.Context, identifier Identifier, params *PatchFeaturePipelineParams, body PatchFeaturePipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchFeaturePipelineResponse, error) { + rsp, err := c.PatchFeaturePipeline(ctx, identifier, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchFeaturePipelineResponse(rsp) +} + +// CreateFlagPipelineWithBodyWithResponse request with arbitrary body returning *CreateFlagPipelineResponse +func (c *ClientWithResponses) CreateFlagPipelineWithBodyWithResponse(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFlagPipelineResponse, error) { + rsp, err := c.CreateFlagPipelineWithBody(ctx, identifier, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateFlagPipelineResponse(rsp) +} + +func (c *ClientWithResponses) CreateFlagPipelineWithResponse(ctx context.Context, identifier Identifier, params *CreateFlagPipelineParams, body CreateFlagPipelineJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFlagPipelineResponse, error) { + rsp, err := c.CreateFlagPipeline(ctx, identifier, params, body, reqEditors...) if err != nil { return nil, err } - return ParseGetOSByIdResponse(rsp) + return ParseCreateFlagPipelineResponse(rsp) +} + +// GetOSByIDWithResponse request returning *GetOSByIDResponse +func (c *ClientWithResponses) GetOSByIDWithResponse(ctx context.Context, identifiers Identifiers, reqEditors ...RequestEditorFn) (*GetOSByIDResponse, error) { + rsp, err := c.GetOSByID(ctx, identifiers, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOSByIDResponse(rsp) } // GetAllProjectsWithResponse request returning *GetAllProjectsResponse @@ -7938,110 +8971,281 @@ func (c *ClientWithResponses) GetTargetsAndSegmentsWithResponse(ctx context.Cont return ParseGetTargetsAndSegmentsResponse(rsp) } -// GetAllTargetAttributesWithResponse request returning *GetAllTargetAttributesResponse -func (c *ClientWithResponses) GetAllTargetAttributesWithResponse(ctx context.Context, params *GetAllTargetAttributesParams, reqEditors ...RequestEditorFn) (*GetAllTargetAttributesResponse, error) { - rsp, err := c.GetAllTargetAttributes(ctx, params, reqEditors...) - if err != nil { - return nil, err +// GetAllTargetAttributesWithResponse request returning *GetAllTargetAttributesResponse +func (c *ClientWithResponses) GetAllTargetAttributesWithResponse(ctx context.Context, params *GetAllTargetAttributesParams, reqEditors ...RequestEditorFn) (*GetAllTargetAttributesResponse, error) { + rsp, err := c.GetAllTargetAttributes(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAllTargetAttributesResponse(rsp) +} + +// UploadTargetsWithBodyWithResponse request with arbitrary body returning *UploadTargetsResponse +func (c *ClientWithResponses) UploadTargetsWithBodyWithResponse(ctx context.Context, params *UploadTargetsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadTargetsResponse, error) { + rsp, err := c.UploadTargetsWithBody(ctx, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUploadTargetsResponse(rsp) +} + +// DeleteTargetWithResponse request returning *DeleteTargetResponse +func (c *ClientWithResponses) DeleteTargetWithResponse(ctx context.Context, identifier Identifier, params *DeleteTargetParams, reqEditors ...RequestEditorFn) (*DeleteTargetResponse, error) { + rsp, err := c.DeleteTarget(ctx, identifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTargetResponse(rsp) +} + +// GetTargetWithResponse request returning *GetTargetResponse +func (c *ClientWithResponses) GetTargetWithResponse(ctx context.Context, identifier Identifier, params *GetTargetParams, reqEditors ...RequestEditorFn) (*GetTargetResponse, error) { + rsp, err := c.GetTarget(ctx, identifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTargetResponse(rsp) +} + +// PatchTargetWithBodyWithResponse request with arbitrary body returning *PatchTargetResponse +func (c *ClientWithResponses) PatchTargetWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTargetResponse, error) { + rsp, err := c.PatchTargetWithBody(ctx, identifier, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchTargetResponse(rsp) +} + +func (c *ClientWithResponses) PatchTargetWithResponse(ctx context.Context, identifier Identifier, params *PatchTargetParams, body PatchTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTargetResponse, error) { + rsp, err := c.PatchTarget(ctx, identifier, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchTargetResponse(rsp) +} + +// ModifyTargetWithBodyWithResponse request with arbitrary body returning *ModifyTargetResponse +func (c *ClientWithResponses) ModifyTargetWithBodyWithResponse(ctx context.Context, identifier Identifier, params *ModifyTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModifyTargetResponse, error) { + rsp, err := c.ModifyTargetWithBody(ctx, identifier, params, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseModifyTargetResponse(rsp) +} + +func (c *ClientWithResponses) ModifyTargetWithResponse(ctx context.Context, identifier Identifier, params *ModifyTargetParams, body ModifyTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*ModifyTargetResponse, error) { + rsp, err := c.ModifyTarget(ctx, identifier, params, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseModifyTargetResponse(rsp) +} + +// GetTargetAvailableSegmentsWithResponse request returning *GetTargetAvailableSegmentsResponse +func (c *ClientWithResponses) GetTargetAvailableSegmentsWithResponse(ctx context.Context, identifier Identifier, params *GetTargetAvailableSegmentsParams, reqEditors ...RequestEditorFn) (*GetTargetAvailableSegmentsResponse, error) { + rsp, err := c.GetTargetAvailableSegments(ctx, identifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTargetAvailableSegmentsResponse(rsp) +} + +// GetTargetSegmentsWithResponse request returning *GetTargetSegmentsResponse +func (c *ClientWithResponses) GetTargetSegmentsWithResponse(ctx context.Context, identifier Identifier, params *GetTargetSegmentsParams, reqEditors ...RequestEditorFn) (*GetTargetSegmentsResponse, error) { + rsp, err := c.GetTargetSegments(ctx, identifier, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTargetSegmentsResponse(rsp) +} + +// GetLicenseUsageWithResponse request returning *GetLicenseUsageResponse +func (c *ClientWithResponses) GetLicenseUsageWithResponse(ctx context.Context, params *GetLicenseUsageParams, reqEditors ...RequestEditorFn) (*GetLicenseUsageResponse, error) { + rsp, err := c.GetLicenseUsage(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetLicenseUsageResponse(rsp) +} + +// ParseGetAllAPIKeysResponse parses an HTTP response from a GetAllAPIKeysWithResponse call +func ParseGetAllAPIKeysResponse(rsp *http.Response) (*GetAllAPIKeysResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAllAPIKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ApiKeys + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseAddAPIKeyResponse parses an HTTP response from a AddAPIKeyWithResponse call +func ParseAddAPIKeyResponse(rsp *http.Response) (*AddAPIKeyResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &AddAPIKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest ApiKey + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } - return ParseGetAllTargetAttributesResponse(rsp) -} -// UploadTargetsWithBodyWithResponse request with arbitrary body returning *UploadTargetsResponse -func (c *ClientWithResponses) UploadTargetsWithBodyWithResponse(ctx context.Context, params *UploadTargetsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadTargetsResponse, error) { - rsp, err := c.UploadTargetsWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUploadTargetsResponse(rsp) + return response, nil } -// DeleteTargetWithResponse request returning *DeleteTargetResponse -func (c *ClientWithResponses) DeleteTargetWithResponse(ctx context.Context, identifier Identifier, params *DeleteTargetParams, reqEditors ...RequestEditorFn) (*DeleteTargetResponse, error) { - rsp, err := c.DeleteTarget(ctx, identifier, params, reqEditors...) +// ParseDeleteAPIKeyResponse parses an HTTP response from a DeleteAPIKeyWithResponse call +func ParseDeleteAPIKeyResponse(rsp *http.Response) (*DeleteAPIKeyResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseDeleteTargetResponse(rsp) -} -// GetTargetWithResponse request returning *GetTargetResponse -func (c *ClientWithResponses) GetTargetWithResponse(ctx context.Context, identifier Identifier, params *GetTargetParams, reqEditors ...RequestEditorFn) (*GetTargetResponse, error) { - rsp, err := c.GetTarget(ctx, identifier, params, reqEditors...) - if err != nil { - return nil, err + response := &DeleteAPIKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetTargetResponse(rsp) -} -// PatchTargetWithBodyWithResponse request with arbitrary body returning *PatchTargetResponse -func (c *ClientWithResponses) PatchTargetWithBodyWithResponse(ctx context.Context, identifier Identifier, params *PatchTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTargetResponse, error) { - rsp, err := c.PatchTargetWithBody(ctx, identifier, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchTargetResponse(rsp) -} + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -func (c *ClientWithResponses) PatchTargetWithResponse(ctx context.Context, identifier Identifier, params *PatchTargetParams, body PatchTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTargetResponse, error) { - rsp, err := c.PatchTarget(ctx, identifier, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchTargetResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest -// ModifyTargetWithBodyWithResponse request with arbitrary body returning *ModifyTargetResponse -func (c *ClientWithResponses) ModifyTargetWithBodyWithResponse(ctx context.Context, identifier Identifier, params *ModifyTargetParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModifyTargetResponse, error) { - rsp, err := c.ModifyTargetWithBody(ctx, identifier, params, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseModifyTargetResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest -func (c *ClientWithResponses) ModifyTargetWithResponse(ctx context.Context, identifier Identifier, params *ModifyTargetParams, body ModifyTargetJSONRequestBody, reqEditors ...RequestEditorFn) (*ModifyTargetResponse, error) { - rsp, err := c.ModifyTarget(ctx, identifier, params, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseModifyTargetResponse(rsp) -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest -// GetTargetAvailableSegmentsWithResponse request returning *GetTargetAvailableSegmentsResponse -func (c *ClientWithResponses) GetTargetAvailableSegmentsWithResponse(ctx context.Context, identifier Identifier, params *GetTargetAvailableSegmentsParams, reqEditors ...RequestEditorFn) (*GetTargetAvailableSegmentsResponse, error) { - rsp, err := c.GetTargetAvailableSegments(ctx, identifier, params, reqEditors...) - if err != nil { - return nil, err } - return ParseGetTargetAvailableSegmentsResponse(rsp) -} -// GetTargetSegmentsWithResponse request returning *GetTargetSegmentsResponse -func (c *ClientWithResponses) GetTargetSegmentsWithResponse(ctx context.Context, identifier Identifier, params *GetTargetSegmentsParams, reqEditors ...RequestEditorFn) (*GetTargetSegmentsResponse, error) { - rsp, err := c.GetTargetSegments(ctx, identifier, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTargetSegmentsResponse(rsp) + return response, nil } -// ParseGetAllAPIKeysResponse parses an HTTP response from a GetAllAPIKeysWithResponse call -func ParseGetAllAPIKeysResponse(rsp *http.Response) (*GetAllAPIKeysResponse, error) { +// ParseGetAPIKeyResponse parses an HTTP response from a GetAPIKeyWithResponse call +func ParseGetAPIKeyResponse(rsp *http.Response) (*GetAPIKeyResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAllAPIKeysResponse{ + response := &GetAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ApiKeys + var dest ApiKey if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8080,27 +9284,20 @@ func ParseGetAllAPIKeysResponse(rsp *http.Response) (*GetAllAPIKeysResponse, err return response, nil } -// ParseAddAPIKeyResponse parses an HTTP response from a AddAPIKeyWithResponse call -func ParseAddAPIKeyResponse(rsp *http.Response) (*AddAPIKeyResponse, error) { +// ParseUpdateAPIKeyResponse parses an HTTP response from a UpdateAPIKeyWithResponse call +func ParseUpdateAPIKeyResponse(rsp *http.Response) (*UpdateAPIKeyResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AddAPIKeyResponse{ + response := &UpdateAPIKeyResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest ApiKey - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8141,20 +9338,92 @@ func ParseAddAPIKeyResponse(rsp *http.Response) (*AddAPIKeyResponse, error) { return response, nil } -// ParseDeleteApiKeyResponse parses an HTTP response from a DeleteApiKeyWithResponse call -func ParseDeleteApiKeyResponse(rsp *http.Response) (*DeleteApiKeyResponse, error) { +// ParseGetAuditByParamsResponse parses an HTTP response from a GetAuditByParamsWithResponse call +func ParseGetAuditByParamsResponse(rsp *http.Response) (*GetAuditByParamsResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAuditByParamsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of Audit Trail events + Data *AuditTrails `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseGetAllEnvironmentsResponse parses an HTTP response from a GetAllEnvironmentsWithResponse call +func ParseGetAllEnvironmentsResponse(rsp *http.Response) (*GetAllEnvironmentsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteApiKeyResponse{ + response := &GetAllEnvironmentsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + CorrelationId string `json:"correlationId"` + + // A list of Environments + Data Environments `json:"data"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status Status `json:"status"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8188,27 +9457,74 @@ func ParseDeleteApiKeyResponse(rsp *http.Response) (*DeleteApiKeyResponse, error return response, nil } -// ParseGetAPIKeyResponse parses an HTTP response from a GetAPIKeyWithResponse call -func ParseGetAPIKeyResponse(rsp *http.Response) (*GetAPIKeyResponse, error) { +// ParseCreateEnvironmentResponse parses an HTTP response from a CreateEnvironmentWithResponse call +func ParseCreateEnvironmentResponse(rsp *http.Response) (*CreateEnvironmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAPIKeyResponse{ + response := &CreateEnvironmentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest ApiKey + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + + } + + return response, nil +} + +// ParseDeleteEnvironmentResponse parses an HTTP response from a DeleteEnvironmentWithResponse call +func ParseDeleteEnvironmentResponse(rsp *http.Response) (*DeleteEnvironmentResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteEnvironmentResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8242,26 +9558,35 @@ func ParseGetAPIKeyResponse(rsp *http.Response) (*GetAPIKeyResponse, error) { return response, nil } -// ParseUpdateAPIKeyResponse parses an HTTP response from a UpdateAPIKeyWithResponse call -func ParseUpdateAPIKeyResponse(rsp *http.Response) (*UpdateAPIKeyResponse, error) { +// ParseGetEnvironmentResponse parses an HTTP response from a GetEnvironmentWithResponse call +func ParseGetEnvironmentResponse(rsp *http.Response) (*GetEnvironmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAPIKeyResponse{ + response := &GetEnvironmentResponse{ Body: bodyBytes, HTTPResponse: rsp, } - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + CorrelationId *string `json:"correlationId,omitempty"` + + // Environment Response + Data *Environment `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` + } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error @@ -8277,12 +9602,12 @@ func ParseUpdateAPIKeyResponse(rsp *http.Response) (*UpdateAPIKeyResponse, error } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON409 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error @@ -8296,31 +9621,26 @@ func ParseUpdateAPIKeyResponse(rsp *http.Response) (*UpdateAPIKeyResponse, error return response, nil } -// ParseGetAuditByParamsResponse parses an HTTP response from a GetAuditByParamsWithResponse call -func ParseGetAuditByParamsResponse(rsp *http.Response) (*GetAuditByParamsResponse, error) { +// ParseModifyEnvironmentResponse parses an HTTP response from a ModifyEnvironmentWithResponse call +func ParseModifyEnvironmentResponse(rsp *http.Response) (*ModifyEnvironmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAuditByParamsResponse{ + response := &ModifyEnvironmentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *AuditTrails `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error @@ -8336,6 +9656,13 @@ func ParseGetAuditByParamsResponse(rsp *http.Response) (*GetAuditByParamsRespons } response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8348,27 +9675,22 @@ func ParseGetAuditByParamsResponse(rsp *http.Response) (*GetAuditByParamsRespons return response, nil } -// ParseGetAllEnvironmentsResponse parses an HTTP response from a GetAllEnvironmentsWithResponse call -func ParseGetAllEnvironmentsResponse(rsp *http.Response) (*GetAllEnvironmentsResponse, error) { +// ParseGetAllFeaturesResponse parses an HTTP response from a GetAllFeaturesWithResponse call +func ParseGetAllFeaturesResponse(rsp *http.Response) (*GetAllFeaturesResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAllEnvironmentsResponse{ + response := &GetAllFeaturesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - CorrelationId string `json:"correlationId"` - Data Environments `json:"data"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status Status `json:"status"` - } + var dest Features if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8407,20 +9729,27 @@ func ParseGetAllEnvironmentsResponse(rsp *http.Response) (*GetAllEnvironmentsRes return response, nil } -// ParseCreateEnvironmentResponse parses an HTTP response from a CreateEnvironmentWithResponse call -func ParseCreateEnvironmentResponse(rsp *http.Response) (*CreateEnvironmentResponse, error) { +// ParseCreateFeatureFlagResponse parses an HTTP response from a CreateFeatureFlagWithResponse call +func ParseCreateFeatureFlagResponse(rsp *http.Response) (*CreateFeatureFlagResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateEnvironmentResponse{ + response := &CreateFeatureFlagResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest FeatureResponseMetadata + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8449,6 +9778,13 @@ func ParseCreateEnvironmentResponse(rsp *http.Response) (*CreateEnvironmentRespo } response.JSON409 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 424: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON424 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8461,20 +9797,27 @@ func ParseCreateEnvironmentResponse(rsp *http.Response) (*CreateEnvironmentRespo return response, nil } -// ParseDeleteEnvironmentResponse parses an HTTP response from a DeleteEnvironmentWithResponse call -func ParseDeleteEnvironmentResponse(rsp *http.Response) (*DeleteEnvironmentResponse, error) { +// ParseGetAvailableFeaturePipelinesResponse parses an HTTP response from a GetAvailableFeaturePipelinesWithResponse call +func ParseGetAvailableFeaturePipelinesResponse(rsp *http.Response) (*GetAvailableFeaturePipelinesResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteEnvironmentResponse{ + response := &GetAvailableFeaturePipelinesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest FeatureAvailablePipelines + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8508,27 +9851,22 @@ func ParseDeleteEnvironmentResponse(rsp *http.Response) (*DeleteEnvironmentRespo return response, nil } -// ParseGetEnvironmentResponse parses an HTTP response from a GetEnvironmentWithResponse call -func ParseGetEnvironmentResponse(rsp *http.Response) (*GetEnvironmentResponse, error) { +// ParseGetFeatureMetricsResponse parses an HTTP response from a GetFeatureMetricsWithResponse call +func ParseGetFeatureMetricsResponse(rsp *http.Response) (*GetFeatureMetricsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetEnvironmentResponse{ + response := &GetFeatureMetricsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Environment `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` - } + var dest FeatureMetrics if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8567,26 +9905,26 @@ func ParseGetEnvironmentResponse(rsp *http.Response) (*GetEnvironmentResponse, e return response, nil } -// ParseModifyEnvironmentResponse parses an HTTP response from a ModifyEnvironmentWithResponse call -func ParseModifyEnvironmentResponse(rsp *http.Response) (*ModifyEnvironmentResponse, error) { +// ParseGetFlagsYamlResponse parses an HTTP response from a GetFlagsYamlWithResponse call +func ParseGetFlagsYamlResponse(rsp *http.Response) (*GetFlagsYamlResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ModifyEnvironmentResponse{ + response := &GetFlagsYamlResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest FeatureFlagsYaml if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error @@ -8602,12 +9940,12 @@ func ParseModifyEnvironmentResponse(rsp *http.Response) (*ModifyEnvironmentRespo } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON409 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error @@ -8621,26 +9959,26 @@ func ParseModifyEnvironmentResponse(rsp *http.Response) (*ModifyEnvironmentRespo return response, nil } -// ParseGetAllFeaturesResponse parses an HTTP response from a GetAllFeaturesWithResponse call -func ParseGetAllFeaturesResponse(rsp *http.Response) (*GetAllFeaturesResponse, error) { +// ParseUpdateFlagsYamlResponse parses an HTTP response from a UpdateFlagsYamlWithResponse call +func ParseUpdateFlagsYamlResponse(rsp *http.Response) (*UpdateFlagsYamlResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetAllFeaturesResponse{ + response := &UpdateFlagsYamlResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Features + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error @@ -8656,12 +9994,12 @@ func ParseGetAllFeaturesResponse(rsp *http.Response) (*GetAllFeaturesResponse, e } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON409 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error @@ -8675,27 +10013,20 @@ func ParseGetAllFeaturesResponse(rsp *http.Response) (*GetAllFeaturesResponse, e return response, nil } -// ParseCreateFeatureFlagResponse parses an HTTP response from a CreateFeatureFlagWithResponse call -func ParseCreateFeatureFlagResponse(rsp *http.Response) (*CreateFeatureFlagResponse, error) { +// ParseDeleteFeatureFlagResponse parses an HTTP response from a DeleteFeatureFlagWithResponse call +func ParseDeleteFeatureFlagResponse(rsp *http.Response) (*DeleteFeatureFlagResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateFeatureFlagResponse{ + response := &DeleteFeatureFlagResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8710,12 +10041,12 @@ func ParseCreateFeatureFlagResponse(rsp *http.Response) (*CreateFeatureFlagRespo } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON409 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 424: var dest Error @@ -8736,22 +10067,22 @@ func ParseCreateFeatureFlagResponse(rsp *http.Response) (*CreateFeatureFlagRespo return response, nil } -// ParseGetFeatureMetricsResponse parses an HTTP response from a GetFeatureMetricsWithResponse call -func ParseGetFeatureMetricsResponse(rsp *http.Response) (*GetFeatureMetricsResponse, error) { +// ParseGetFeatureFlagResponse parses an HTTP response from a GetFeatureFlagWithResponse call +func ParseGetFeatureFlagResponse(rsp *http.Response) (*GetFeatureFlagResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetFeatureMetricsResponse{ + response := &GetFeatureFlagResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest FeatureMetrics + var dest Feature if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -8790,27 +10121,34 @@ func ParseGetFeatureMetricsResponse(rsp *http.Response) (*GetFeatureMetricsRespo return response, nil } -// ParseGetFlagsYamlResponse parses an HTTP response from a GetFlagsYamlWithResponse call -func ParseGetFlagsYamlResponse(rsp *http.Response) (*GetFlagsYamlResponse, error) { +// ParsePatchFeatureResponse parses an HTTP response from a PatchFeatureWithResponse call +func ParsePatchFeatureResponse(rsp *http.Response) (*PatchFeatureResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetFlagsYamlResponse{ + response := &PatchFeatureResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest FeatureFlagsYaml + var dest FeatureResponseMetadata if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8832,6 +10170,20 @@ func ParseGetFlagsYamlResponse(rsp *http.Response) (*GetFlagsYamlResponse, error } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 424: + var dest Error + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON424 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8844,26 +10196,26 @@ func ParseGetFlagsYamlResponse(rsp *http.Response) (*GetFlagsYamlResponse, error return response, nil } -// ParseUpdateFlagsYamlResponse parses an HTTP response from a UpdateFlagsYamlWithResponse call -func ParseUpdateFlagsYamlResponse(rsp *http.Response) (*UpdateFlagsYamlResponse, error) { +// ParseGetFeatureEvaluationsResponse parses an HTTP response from a GetFeatureEvaluationsWithResponse call +func ParseGetFeatureEvaluationsResponse(rsp *http.Response) (*GetFeatureEvaluationsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateFlagsYamlResponse{ + response := &GetFeatureEvaluationsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest Error + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest FeatureEvaluations if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error @@ -8879,12 +10231,12 @@ func ParseUpdateFlagsYamlResponse(rsp *http.Response) (*UpdateFlagsYamlResponse, } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON409 = &dest + response.JSON404 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error @@ -8898,15 +10250,15 @@ func ParseUpdateFlagsYamlResponse(rsp *http.Response) (*UpdateFlagsYamlResponse, return response, nil } -// ParseDeleteFeatureFlagResponse parses an HTTP response from a DeleteFeatureFlagWithResponse call -func ParseDeleteFeatureFlagResponse(rsp *http.Response) (*DeleteFeatureFlagResponse, error) { +// ParseDeleteFeaturePipelineResponse parses an HTTP response from a DeleteFeaturePipelineWithResponse call +func ParseDeleteFeaturePipelineResponse(rsp *http.Response) (*DeleteFeaturePipelineResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteFeatureFlagResponse{ + response := &DeleteFeaturePipelineResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -8933,13 +10285,6 @@ func ParseDeleteFeatureFlagResponse(rsp *http.Response) (*DeleteFeatureFlagRespo } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 424: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON424 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -8952,22 +10297,22 @@ func ParseDeleteFeatureFlagResponse(rsp *http.Response) (*DeleteFeatureFlagRespo return response, nil } -// ParseGetFeatureFlagResponse parses an HTTP response from a GetFeatureFlagWithResponse call -func ParseGetFeatureFlagResponse(rsp *http.Response) (*GetFeatureFlagResponse, error) { +// ParseGetFeaturePipelineResponse parses an HTTP response from a GetFeaturePipelineWithResponse call +func ParseGetFeaturePipelineResponse(rsp *http.Response) (*GetFeaturePipelineResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetFeatureFlagResponse{ + response := &GetFeaturePipelineResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Feature + var dest FeaturePipelineResp if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -9006,27 +10351,20 @@ func ParseGetFeatureFlagResponse(rsp *http.Response) (*GetFeatureFlagResponse, e return response, nil } -// ParsePatchFeatureResponse parses an HTTP response from a PatchFeatureWithResponse call -func ParsePatchFeatureResponse(rsp *http.Response) (*PatchFeatureResponse, error) { +// ParsePatchFeaturePipelineResponse parses an HTTP response from a PatchFeaturePipelineWithResponse call +func ParsePatchFeaturePipelineResponse(rsp *http.Response) (*PatchFeaturePipelineResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &PatchFeatureResponse{ + response := &PatchFeaturePipelineResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Feature - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9055,20 +10393,6 @@ func ParsePatchFeatureResponse(rsp *http.Response) (*PatchFeatureResponse, error } response.JSON404 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 424: - var dest Error - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON424 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -9081,26 +10405,26 @@ func ParsePatchFeatureResponse(rsp *http.Response) (*PatchFeatureResponse, error return response, nil } -// ParseGetFeatureEvaluationsResponse parses an HTTP response from a GetFeatureEvaluationsWithResponse call -func ParseGetFeatureEvaluationsResponse(rsp *http.Response) (*GetFeatureEvaluationsResponse, error) { +// ParseCreateFlagPipelineResponse parses an HTTP response from a CreateFlagPipelineWithResponse call +func ParseCreateFlagPipelineResponse(rsp *http.Response) (*CreateFlagPipelineResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetFeatureEvaluationsResponse{ + response := &CreateFlagPipelineResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest FeatureEvaluations + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON200 = &dest + response.JSON400 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest Error @@ -9116,12 +10440,12 @@ func ParseGetFeatureEvaluationsResponse(rsp *http.Response) (*GetFeatureEvaluati } response.JSON403 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: var dest Error if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON409 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest Error @@ -9135,15 +10459,15 @@ func ParseGetFeatureEvaluationsResponse(rsp *http.Response) (*GetFeatureEvaluati return response, nil } -// ParseGetOSByIdResponse parses an HTTP response from a GetOSByIdWithResponse call -func ParseGetOSByIdResponse(rsp *http.Response) (*GetOSByIdResponse, error) { +// ParseGetOSByIDResponse parses an HTTP response from a GetOSByIDWithResponse call +func ParseGetOSByIDResponse(rsp *http.Response) (*GetOSByIDResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetOSByIdResponse{ + response := &GetOSByIDResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -9151,10 +10475,14 @@ func ParseGetOSByIdResponse(rsp *http.Response) (*GetOSByIdResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *ObjectSnapshots `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of Object Snapshots + Data *ObjectSnapshots `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9197,7 +10525,7 @@ func ParseGetOSByIdResponse(rsp *http.Response) (*GetOSByIdResponse, error) { // ParseGetAllProjectsResponse parses an HTTP response from a GetAllProjectsWithResponse call func ParseGetAllProjectsResponse(rsp *http.Response) (*GetAllProjectsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9210,10 +10538,14 @@ func ParseGetAllProjectsResponse(rsp *http.Response) (*GetAllProjectsResponse, e switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Projects `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of projects + Data *Projects `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9256,7 +10588,7 @@ func ParseGetAllProjectsResponse(rsp *http.Response) (*GetAllProjectsResponse, e // ParseCreateProjectResponse parses an HTTP response from a CreateProjectWithResponse call func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9310,7 +10642,7 @@ func ParseCreateProjectResponse(rsp *http.Response) (*CreateProjectResponse, err // ParseDeleteProjectResponse parses an HTTP response from a DeleteProjectWithResponse call func ParseDeleteProjectResponse(rsp *http.Response) (*DeleteProjectResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9357,7 +10689,7 @@ func ParseDeleteProjectResponse(rsp *http.Response) (*DeleteProjectResponse, err // ParseGetProjectResponse parses an HTTP response from a GetProjectWithResponse call func ParseGetProjectResponse(rsp *http.Response) (*GetProjectResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9370,10 +10702,14 @@ func ParseGetProjectResponse(rsp *http.Response) (*GetProjectResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Project `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A project response + Data *Project `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -9416,7 +10752,7 @@ func ParseGetProjectResponse(rsp *http.Response) (*GetProjectResponse, error) { // ParseModifyProjectResponse parses an HTTP response from a ModifyProjectWithResponse call func ParseModifyProjectResponse(rsp *http.Response) (*ModifyProjectResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9470,7 +10806,7 @@ func ParseModifyProjectResponse(rsp *http.Response) (*ModifyProjectResponse, err // ParseDeleteGitRepoResponse parses an HTTP response from a DeleteGitRepoWithResponse call func ParseDeleteGitRepoResponse(rsp *http.Response) (*DeleteGitRepoResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9517,7 +10853,7 @@ func ParseDeleteGitRepoResponse(rsp *http.Response) (*DeleteGitRepoResponse, err // ParseGetGitRepoResponse parses an HTTP response from a GetGitRepoWithResponse call func ParseGetGitRepoResponse(rsp *http.Response) (*GetGitRepoResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9571,7 +10907,7 @@ func ParseGetGitRepoResponse(rsp *http.Response) (*GetGitRepoResponse, error) { // ParsePatchGitRepoResponse parses an HTTP response from a PatchGitRepoWithResponse call func ParsePatchGitRepoResponse(rsp *http.Response) (*PatchGitRepoResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9632,7 +10968,7 @@ func ParsePatchGitRepoResponse(rsp *http.Response) (*PatchGitRepoResponse, error // ParseCreateGitRepoResponse parses an HTTP response from a CreateGitRepoWithResponse call func ParseCreateGitRepoResponse(rsp *http.Response) (*CreateGitRepoResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9686,7 +11022,7 @@ func ParseCreateGitRepoResponse(rsp *http.Response) (*CreateGitRepoResponse, err // ParseGetAllSegmentsResponse parses an HTTP response from a GetAllSegmentsWithResponse call func ParseGetAllSegmentsResponse(rsp *http.Response) (*GetAllSegmentsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9733,7 +11069,7 @@ func ParseGetAllSegmentsResponse(rsp *http.Response) (*GetAllSegmentsResponse, e // ParseCreateSegmentResponse parses an HTTP response from a CreateSegmentWithResponse call func ParseCreateSegmentResponse(rsp *http.Response) (*CreateSegmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9787,7 +11123,7 @@ func ParseCreateSegmentResponse(rsp *http.Response) (*CreateSegmentResponse, err // ParseDeleteSegmentResponse parses an HTTP response from a DeleteSegmentWithResponse call func ParseDeleteSegmentResponse(rsp *http.Response) (*DeleteSegmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9834,7 +11170,7 @@ func ParseDeleteSegmentResponse(rsp *http.Response) (*DeleteSegmentResponse, err // ParseGetSegmentResponse parses an HTTP response from a GetSegmentWithResponse call func ParseGetSegmentResponse(rsp *http.Response) (*GetSegmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9888,7 +11224,7 @@ func ParseGetSegmentResponse(rsp *http.Response) (*GetSegmentResponse, error) { // ParsePatchSegmentResponse parses an HTTP response from a PatchSegmentWithResponse call func ParsePatchSegmentResponse(rsp *http.Response) (*PatchSegmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -9956,7 +11292,7 @@ func ParsePatchSegmentResponse(rsp *http.Response) (*PatchSegmentResponse, error // ParseGetAvailableFlagsForSegmentResponse parses an HTTP response from a GetAvailableFlagsForSegmentWithResponse call func ParseGetAvailableFlagsForSegmentResponse(rsp *http.Response) (*GetAvailableFlagsForSegmentResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10010,7 +11346,7 @@ func ParseGetAvailableFlagsForSegmentResponse(rsp *http.Response) (*GetAvailable // ParseGetSegmentFlagsResponse parses an HTTP response from a GetSegmentFlagsWithResponse call func ParseGetSegmentFlagsResponse(rsp *http.Response) (*GetSegmentFlagsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10064,7 +11400,7 @@ func ParseGetSegmentFlagsResponse(rsp *http.Response) (*GetSegmentFlagsResponse, // ParseGetAllTargetsResponse parses an HTTP response from a GetAllTargetsWithResponse call func ParseGetAllTargetsResponse(rsp *http.Response) (*GetAllTargetsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10118,7 +11454,7 @@ func ParseGetAllTargetsResponse(rsp *http.Response) (*GetAllTargetsResponse, err // ParseCreateTargetResponse parses an HTTP response from a CreateTargetWithResponse call func ParseCreateTargetResponse(rsp *http.Response) (*CreateTargetResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10172,7 +11508,7 @@ func ParseCreateTargetResponse(rsp *http.Response) (*CreateTargetResponse, error // ParseGetTargetsAndSegmentsInfoResponse parses an HTTP response from a GetTargetsAndSegmentsInfoWithResponse call func ParseGetTargetsAndSegmentsInfoResponse(rsp *http.Response) (*GetTargetsAndSegmentsInfoResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10226,7 +11562,7 @@ func ParseGetTargetsAndSegmentsInfoResponse(rsp *http.Response) (*GetTargetsAndS // ParseGetTargetsAndSegmentsResponse parses an HTTP response from a GetTargetsAndSegmentsWithResponse call func ParseGetTargetsAndSegmentsResponse(rsp *http.Response) (*GetTargetsAndSegmentsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10280,7 +11616,7 @@ func ParseGetTargetsAndSegmentsResponse(rsp *http.Response) (*GetTargetsAndSegme // ParseGetAllTargetAttributesResponse parses an HTTP response from a GetAllTargetAttributesWithResponse call func ParseGetAllTargetAttributesResponse(rsp *http.Response) (*GetAllTargetAttributesResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10334,7 +11670,7 @@ func ParseGetAllTargetAttributesResponse(rsp *http.Response) (*GetAllTargetAttri // ParseUploadTargetsResponse parses an HTTP response from a UploadTargetsWithResponse call func ParseUploadTargetsResponse(rsp *http.Response) (*UploadTargetsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10388,7 +11724,7 @@ func ParseUploadTargetsResponse(rsp *http.Response) (*UploadTargetsResponse, err // ParseDeleteTargetResponse parses an HTTP response from a DeleteTargetWithResponse call func ParseDeleteTargetResponse(rsp *http.Response) (*DeleteTargetResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10435,7 +11771,7 @@ func ParseDeleteTargetResponse(rsp *http.Response) (*DeleteTargetResponse, error // ParseGetTargetResponse parses an HTTP response from a GetTargetWithResponse call func ParseGetTargetResponse(rsp *http.Response) (*GetTargetResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10489,7 +11825,7 @@ func ParseGetTargetResponse(rsp *http.Response) (*GetTargetResponse, error) { // ParsePatchTargetResponse parses an HTTP response from a PatchTargetWithResponse call func ParsePatchTargetResponse(rsp *http.Response) (*PatchTargetResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10557,7 +11893,7 @@ func ParsePatchTargetResponse(rsp *http.Response) (*PatchTargetResponse, error) // ParseModifyTargetResponse parses an HTTP response from a ModifyTargetWithResponse call func ParseModifyTargetResponse(rsp *http.Response) (*ModifyTargetResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10625,7 +11961,7 @@ func ParseModifyTargetResponse(rsp *http.Response) (*ModifyTargetResponse, error // ParseGetTargetAvailableSegmentsResponse parses an HTTP response from a GetTargetAvailableSegmentsWithResponse call func ParseGetTargetAvailableSegmentsResponse(rsp *http.Response) (*GetTargetAvailableSegmentsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10679,7 +12015,7 @@ func ParseGetTargetAvailableSegmentsResponse(rsp *http.Response) (*GetTargetAvai // ParseGetTargetSegmentsResponse parses an HTTP response from a GetTargetSegmentsWithResponse call func ParseGetTargetSegmentsResponse(rsp *http.Response) (*GetTargetSegmentsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -10730,3 +12066,28 @@ func ParseGetTargetSegmentsResponse(rsp *http.Response) (*GetTargetSegmentsRespo return response, nil } +// ParseGetLicenseUsageResponse parses an HTTP response from a GetLicenseUsageWithResponse call +func ParseGetLicenseUsageResponse(rsp *http.Response) (*GetLicenseUsageResponse, error) { + bodyBytes, err := ioutil.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetLicenseUsageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CFLicenseUsageDTO + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} diff --git a/gen/admin/types.gen.go b/gen/admin/types.gen.go index 7c0ef8c2..b6310d01 100644 --- a/gen/admin/types.gen.go +++ b/gen/admin/types.gen.go @@ -1,252 +1,806 @@ // Package admin provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT. package admin const ( + ApiKeyScopes = "ApiKey.Scopes" ApiKeyAuthScopes = "ApiKeyAuth.Scopes" BearerAuthScopes = "BearerAuth.Scopes" ) -// ApiKey defines model for ApiKey. +// Defines values for ApiKeyType. +const ( + ApiKeyTypeClient ApiKeyType = "client" + ApiKeyTypeServer ApiKeyType = "server" +) + +// Defines values for ApiKeyRequestType. +const ( + ApiKeyRequestTypeClient ApiKeyRequestType = "Client" + ApiKeyRequestTypeServer ApiKeyRequestType = "Server" +) + +// Defines values for FeatureKind. +const ( + FeatureKindBoolean FeatureKind = "boolean" + FeatureKindInt FeatureKind = "int" + FeatureKindJson FeatureKind = "json" + FeatureKindString FeatureKind = "string" +) + +// Defines values for FeatureFlagRequestKind. +const ( + FeatureFlagRequestKindBoolean FeatureFlagRequestKind = "boolean" + FeatureFlagRequestKindInt FeatureFlagRequestKind = "int" + FeatureFlagRequestKindJson FeatureFlagRequestKind = "json" + FeatureFlagRequestKindString FeatureFlagRequestKind = "string" +) + +// Defines values for FeatureState. +const ( + Off FeatureState = "off" + On FeatureState = "on" +) + +// Defines values for FeatureStatusStatus. +const ( + Active FeatureStatusStatus = "active" + Inactive FeatureStatusStatus = "inactive" + NeverRequested FeatureStatusStatus = "never-requested" +) + +// Defines values for SegmentFlagType. +const ( + CONDITION SegmentFlagType = "CONDITION" + DIRECT SegmentFlagType = "DIRECT" +) + +// Defines values for Status. +const ( + ERROR Status = "ERROR" + FAILURE Status = "FAILURE" + SUCCESS Status = "SUCCESS" +) + +// Defines values for TargetAndSegmentType. +const ( + TargetAndSegmentTypeSegment TargetAndSegmentType = "segment" + TargetAndSegmentTypeTarget TargetAndSegmentType = "target" +) + +// Defines values for AuditSortByField. +const ( + Action AuditSortByField = "action" + Actor AuditSortByField = "actor" + ExecutedOn AuditSortByField = "executed_on" +) + +// Defines values for AuditSortOrder. +const ( + AuditSortOrderASC AuditSortOrder = "ASC" + AuditSortOrderDESC AuditSortOrder = "DESC" +) + +// Defines values for KindQueryParam. +const ( + Boolean KindQueryParam = "boolean" + Int KindQueryParam = "int" + Json KindQueryParam = "json" + String KindQueryParam = "string" +) + +// Defines values for ObjectTypeQueryParam. +const ( + ObjectTypeQueryParamFeatureActivation ObjectTypeQueryParam = "FeatureActivation" + ObjectTypeQueryParamSegment ObjectTypeQueryParam = "Segment" +) + +// Defines values for SafSortByField. +const ( + SafSortByFieldName SafSortByField = "name" +) + +// Defines values for SafSortOrder. +const ( + SafSortOrderASCENDING SafSortOrder = "ASCENDING" + SafSortOrderDESCENDING SafSortOrder = "DESCENDING" +) + +// Defines values for SortByField. +const ( + SortByFieldArchived SortByField = "archived" + SortByFieldIdentifier SortByField = "identifier" + SortByFieldKind SortByField = "kind" + SortByFieldModifiedAt SortByField = "modifiedAt" + SortByFieldName SortByField = "name" +) + +// Defines values for SortOrder. +const ( + SortOrderASCENDING SortOrder = "ASCENDING" + SortOrderDESCENDING SortOrder = "DESCENDING" +) + +// Defines values for TargetSortByField. +const ( + TargetSortByFieldCreatedAt TargetSortByField = "createdAt" + TargetSortByFieldIdentifier TargetSortByField = "identifier" + TargetSortByFieldName TargetSortByField = "name" +) + +// Defines values for TargetSortOrder. +const ( + TargetSortOrderASC TargetSortOrder = "ASC" + TargetSortOrderDESC TargetSortOrder = "DESC" +) + +// Defines values for TasSortByField. +const ( + TasSortByFieldName TasSortByField = "name" +) + +// Defines values for TasSortOrder. +const ( + ASCENDING TasSortOrder = "ASCENDING" + DESCENDING TasSortOrder = "DESCENDING" +) + +// Defines values for TsSortByField. +const ( + TsSortByFieldIdentifier TsSortByField = "identifier" + TsSortByFieldName TsSortByField = "name" +) + +// Defines values for TsSortOrder. +const ( + ASC TsSortOrder = "ASC" + DESC TsSortOrder = "DESC" +) + +// The API key is used by SDKs to connect to Harness Feature Flags type ApiKey struct { + // The Key will be shown only on create. On subsequent GET calls, only the masked APIKeys will be returned + ApiKey string `json:"apiKey"` - // The Key will be shown only on create. On subsequemt GET calls, only the masked APIKeys will be returned - ApiKey string `json:"apiKey"` + // The environment that this key was created in Identifier string `json:"identifier"` - // The hashed API key - Key *string `json:"key,omitempty"` - Name string `json:"name"` - Type string `json:"type"` + // A hash of API key + Key *string `json:"key,omitempty"` + + // The user friendly identifier for the API Key + Name string `json:"name"` + + // The type of key depending on the SDK that is being used. + Type ApiKeyType `json:"type"` } +// The type of key depending on the SDK that is being used. +type ApiKeyType string + +// The type of key depending on the SDK that is being used. +type ApiKeyRequestType string + // ApiKeys defines model for ApiKeys. type ApiKeys struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded fields due to inline allOf schema ApiKeys *[]ApiKey `json:"apiKeys,omitempty"` + + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } -// AuditTrail defines model for AuditTrail. +// The audit trail shows events that have occured for a given object type AuditTrail struct { - Action string `json:"action"` - Actor string `json:"actor"` - Comment string `json:"comment"` - Enviroment *string `json:"enviroment,omitempty"` - ExecutedOn int `json:"executedOn"` - InstructionSet []map[string]interface{} `json:"instructionSet"` - ObjectAfter string `json:"objectAfter"` - ObjectBefore string `json:"objectBefore"` - ObjectIdentifier string `json:"objectIdentifier"` - ObjectType string `json:"objectType"` - Project string `json:"project"` - Status string `json:"status"` + // The action which triggered the event such as Created or Patched + Action string `json:"action"` + + // The user that performed the event + Actor string `json:"actor"` + + // A user specified comment when performing the action + Comment string `json:"comment"` + + // The environment identifier + Environment string `json:"environment"` + + // The date in milliseconds the event was performed + ExecutedOn int `json:"executedOn"` + + // JSON payload representing the instruction that triggered the audit event + InstructionSet []map[string]interface{} `json:"instructionSet"` + ObjectAfter string `json:"objectAfter"` + ObjectBefore string `json:"objectBefore"` + + // The objects identifier + ObjectIdentifier string `json:"objectIdentifier"` + + // The type of the object such as Target, FeatureConfig + ObjectType string `json:"objectType"` + + // The project identifier + Project string `json:"project"` + + // The status of the event indicating if it was successful or not + Status string `json:"status"` } // AuditTrails defines model for AuditTrails. type AuditTrails struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded fields due to inline allOf schema AuditTrails *[]AuditTrail `json:"auditTrails,omitempty"` + + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } -// Clause defines model for Clause. +// License Usage details for the feature flag account +type CFLicenseUsageDTO struct { + // The account ID to get usage details for + AccountIdnetifier *string `json:"accountIdnetifier,omitempty"` + ActiveClientMAUs *UsageDataDTO `json:"activeClientMAUs,omitempty"` + ActiveFeatureFlagUsers *UsageDataDTO `json:"activeFeatureFlagUsers,omitempty"` + + // The module type + Module *string `json:"module,omitempty"` + + // The time that this data was generated + Timestamp *int64 `json:"timestamp,omitempty"` +} + +// A clause describes what conditions are used to evaluate a flag type Clause struct { - Attribute string `json:"attribute"` - Id string `json:"id"` - Negate bool `json:"negate"` - Op string `json:"op"` - Values []string `json:"values"` + // The attribute to use in the clause. This can be any target attribute + Attribute string `json:"attribute"` + + // The unique ID for the clause + Id *string `json:"id,omitempty"` + + // Is the operation negated? + Negate bool `json:"negate"` + + // The type of operation such as equals, starts_with, contains + Op string `json:"op"` + + // The values that are compared against the operator + Values []string `json:"values"` } -// Distribution defines model for Distribution. +// Describes a distribution rule type Distribution struct { - BucketBy string `json:"bucketBy"` + // The attribute to use when distributing targets across buckets + BucketBy string `json:"bucketBy"` + + // A list of variations and the weight that should be given to each Variations []WeightedVariation `json:"variations"` } -// Environment defines model for Environment. +// Environment Response type Environment struct { - ApiKeys ApiKeys `json:"apiKeys"` + // A list of API Keys + ApiKeys ApiKeys `json:"apiKeys"` + + // A description for this Environment Description *string `json:"description,omitempty"` - Id *string `json:"id,omitempty"` - Identifier string `json:"identifier"` - Name string `json:"name"` - Project string `json:"project"` - Tags *[]Tag `json:"tags,omitempty"` + + // The Environment internal ID + Id *string `json:"id,omitempty"` + + // The Environment identifier + Identifier string `json:"identifier"` + + // The user friendly name of the Environment + Name string `json:"name"` + + // The project for this Environment + Project string `json:"project"` + Tags *[]Tag `json:"tags,omitempty"` } -// Environments defines model for Environments. +// A list of Environments type Environments struct { Environments *[]Environment `json:"environments,omitempty"` } // Error defines model for Error. type Error struct { - Code string `json:"code"` + // The http error code + Code string `json:"code"` + + // Additional details about the error + Details *map[string]interface{} `json:"details,omitempty"` + + // The reason the request failed Message string `json:"message"` } -// Feature defines model for Feature. +// A Feature Flag response type Feature struct { - Archived bool `json:"archived"` - CreatedAt int64 `json:"createdAt"` - DefaultOffVariation string `json:"defaultOffVariation"` - DefaultOnVariation string `json:"defaultOnVariation"` - Description *string `json:"description,omitempty"` - EnvProperties *struct { - DefaultServe Serve `json:"defaultServe"` - Environment string `json:"environment"` - ModifiedAt int64 `json:"modifiedAt"` - OffVariation string `json:"offVariation"` - Rules *[]ServingRule `json:"rules,omitempty"` - State FeatureState `json:"state"` + // Indicates if the flag has been archived and is no longer used + Archived *bool `json:"archived,omitempty"` + + // The date the flag was created in milliseconds + CreatedAt int64 `json:"createdAt"` + + // The default value returned when a flag is off + DefaultOffVariation string `json:"defaultOffVariation"` + + // The default value returned when a flag is on + DefaultOnVariation string `json:"defaultOnVariation"` + + // A description for this flag + Description *string `json:"description,omitempty"` + + // The Feature Flag rules for a given environment + EnvProperties *struct { + // Describe the distribution rule and the variation that should be served to the target + DefaultServe Serve `json:"defaultServe"` + + // The environment identifier + Environment string `json:"environment"` + + // The last time the flag was modified in this environment + ModifiedAt *int64 `json:"modifiedAt,omitempty"` + + // The variation to serve for this flag in this environment when the flag is off + OffVariation string `json:"offVariation"` + PipelineConfigured bool `json:"pipelineConfigured"` + + // A pipeline configured to update a feature + PipelineDetails *FeaturePipeline `json:"pipelineDetails,omitempty"` + PipelineErrorReason *string `json:"pipelineErrorReason,omitempty"` + PipelineErrorState *bool `json:"pipelineErrorState,omitempty"` + + // A list of rules to use when evaluating this flag in this environment + Rules *[]ServingRule `json:"rules,omitempty"` + + // The state of a flag either off or on + State FeatureState `json:"state"` + + // A list of the variations that will be served to specific targets or target groups in an environment. VariationMap *[]VariationMap `json:"variationMap,omitempty"` - Version *int64 `json:"version,omitempty"` + + // The version of the flag. This is incremented each time it is changed + Version *int64 `json:"version,omitempty"` } `json:"envProperties,omitempty"` - Evaluation *string `json:"evaluation,omitempty"` - EvaluationIdentifier *string `json:"evaluationIdentifier,omitempty"` - Identifier string `json:"identifier"` - Kind string `json:"kind"` - ModifiedAt int64 `json:"modifiedAt"` - Name string `json:"name"` - Owner *[]string `json:"owner,omitempty"` - Permanent bool `json:"permanent"` - Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"` - Project string `json:"project"` - Results *[]Results `json:"results,omitempty"` - Status *FeatureStatus `json:"status,omitempty"` - Tags *[]Tag `json:"tags,omitempty"` - Variations []Variation `json:"variations"` -} - -// FeatureEvaluation defines model for FeatureEvaluation. + + // The value that the flag will return for the current user + Evaluation *string `json:"evaluation,omitempty"` + + // The identifier for the returned evaluation + EvaluationIdentifier *string `json:"evaluationIdentifier,omitempty"` + + // The Feature Flag identifier + Identifier string `json:"identifier"` + + // The type of Feature flag + Kind FeatureKind `json:"kind"` + + // The date the flag was last modified in milliseconds + ModifiedAt *int64 `json:"modifiedAt,omitempty"` + + // The name of the Feature Flag + Name string `json:"name"` + + // The user who created the flag + Owner *[]string `json:"owner,omitempty"` + + // Indicates if this is a permanent flag, or one that should expire + Permanent *bool `json:"permanent,omitempty"` + Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"` + + // The project this Feature belongs to + Project string `json:"project"` + + // The results shows which variations have been evaluated, and how many times each of these have been evaluated. + Results *[]Results `json:"results,omitempty"` + + // A list of services linked to this Feature Flag + Services *[]Service `json:"services,omitempty"` + + // Indicates when the flag was last evaluated + Status *FeatureStatus `json:"status,omitempty"` + + // A list of tags for this Feature Flag + Tags *[]Tag `json:"tags,omitempty"` + + // The variations that can be returned for this flag + Variations []Variation `json:"variations"` +} + +// The type of Feature flag +type FeatureKind string + +// A Feature Flag pipeline is a pipeline that is able to perform a flag update +type FeatureAvailablePipeline struct { + // creation date in milliseconds + CreatedAt *int `json:"createdAt,omitempty"` + + // The description of the pipeline + Description *string `json:"description,omitempty"` + + // The identifier of the pipeline + Identifier string `json:"identifier"` + + // last updated date in milliseconds + LastUpdatedAt *int `json:"lastUpdatedAt,omitempty"` + + // The name of the pipeline + Name string `json:"name"` +} + +// FeatureAvailablePipelines defines model for FeatureAvailablePipelines. +type FeatureAvailablePipelines struct { + AvailablePipelines []FeatureAvailablePipeline `json:"availablePipelines"` + + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` +} + +// FeatureCounts defines model for FeatureCounts. +type FeatureCounts struct { + // The total number of flags with a active status in a project/environment + TotalActive *int `json:"totalActive,omitempty"` + + // The total number of flags that are turned on in a project/environment + TotalEnabled *int `json:"totalEnabled,omitempty"` + + // The total number of flags in the project/environment + TotalFeatures *int `json:"totalFeatures,omitempty"` + + // The total number of permanent flags in a project/environment + TotalPermanent *int `json:"totalPermanent,omitempty"` + + // The total number of flags with a potentially-stale status in a project/environment + TotalPotentiallyStale *int `json:"totalPotentiallyStale,omitempty"` + + // The total number of flags with a recently-accessed status in a project/environment + TotalRecentlyAccessed *int `json:"totalRecentlyAccessed,omitempty"` +} + +// A Feature Flag evaluation describes a variation for the flag and the number of times it was evaluated type FeatureEvaluation struct { - Count *int `json:"count,omitempty"` - Date *int `json:"date,omitempty"` + // The number of times this variation has been evaluated + Count *int `json:"count,omitempty"` + + // The date in milliseconds + Date *int `json:"date,omitempty"` + + // The variation identifier VariationIdentifier *string `json:"variationIdentifier,omitempty"` - VariationName *string `json:"variationName,omitempty"` + + // The user friendly name for this variation + VariationName *string `json:"variationName,omitempty"` } -// FeatureEvaluations defines model for FeatureEvaluations. +// A list of Feature Evaluations type FeatureEvaluations struct { Evaluations *[]FeatureEvaluation `json:"evaluations,omitempty"` } +// FeatureFlagRequestKind defines model for FeatureFlagRequestKind. +type FeatureFlagRequestKind string + // Feature flags yaml for a project type FeatureFlagsYaml struct { + // The yaml payload describing the feature flags configuration Yaml string `json:"yaml"` } // FeatureMetric defines model for FeatureMetric. type FeatureMetric struct { - Identifier *string `json:"identifier,omitempty"` - Name *string `json:"name,omitempty"` - Results *[]Results `json:"results,omitempty"` - Status *FeatureStatus `json:"status,omitempty"` + // The feature flag identifier + Identifier *string `json:"identifier,omitempty"` + + // The name of the feature flag + Name *string `json:"name,omitempty"` + Results *[]Results `json:"results,omitempty"` + + // Indicates when the flag was last evaluated + Status *FeatureStatus `json:"status,omitempty"` } -// FeatureMetrics defines model for FeatureMetrics. +// A list of FeatureMetrics type FeatureMetrics struct { Metrics *[]FeatureMetric `json:"metrics,omitempty"` } -// FeatureState defines model for FeatureState. -type FeatureState string +// A pipeline configured to update a feature +type FeaturePipeline struct { + // creation date in milliseconds + CreatedAt *int `json:"createdAt,omitempty"` -// List of FeatureState -const ( - FeatureState_off FeatureState = "off" - FeatureState_on FeatureState = "on" -) + // The description of the pipeline + Description *string `json:"description,omitempty"` + + // The identifier of the pipeline + Identifier string `json:"identifier"` + + // last updated date in milliseconds + LastUpdatedAt *int `json:"lastUpdatedAt,omitempty"` + + // The name of the pipeline + Name string `json:"name"` +} + +// A pipeline execution to edit a feature +type FeaturePipelineExecution struct { + // created date in milliseconds + CreatedAt int `json:"createdAt"` + + // timestamp of the end of the pipeline execution in milliseconds + EndTs *int `json:"endTs,omitempty"` + + // The environment of the pipeline execution + Environment string `json:"environment"` + + // The error info of the pipeline execution + ExecutionErrorInfo *string `json:"executionErrorInfo,omitempty"` + + // The id of the pipeline execution + ExecutionId string `json:"executionId"` + + // The number of failed stages in the pipeline execution + FailedStagesCount *int `json:"failedStagesCount,omitempty"` + + // The id of the pipeline sequence + RunSequence *int `json:"runSequence,omitempty"` + + // The number of running stages in the pipeline execution + RunningStagesCount *int `json:"runningStagesCount,omitempty"` + + // timestamp of the start of the pipeline execution in milliseconds + StartTs *int `json:"startTs,omitempty"` + + // The status of the pipeline execution + Status string `json:"status"` + + // The number of succeeded stages in the pipeline execution + SucceededStagesCount *int `json:"succeededStagesCount,omitempty"` + + // The number of stages in the pipeline execution + TotalStagesCount *int `json:"totalStagesCount,omitempty"` + + // The trigger details of the pipeline execution + TriggerDetails struct { + // Describe the distribution rule and the variation that should be served to the target + DefaultOffVariation *Serve `json:"defaultOffVariation,omitempty"` + + // Describe the distribution rule and the variation that should be served to the target + DefaultServe *Serve `json:"defaultServe,omitempty"` + + // A list of rules to use when evaluating this flag in this environment + Rules *[]ServingRule `json:"rules,omitempty"` + + // The state of a flag either off or on + State *FeatureState `json:"state,omitempty"` + + // A list of the variations that will be served to specific targets or target groups in an environment. + VariationMap *[]VariationMap `json:"variationMap,omitempty"` + } `json:"triggerDetails"` + + // The user who triggered the pipeline execution + TriggeredBy *string `json:"triggeredBy,omitempty"` +} + +// FeaturePipelineResp defines model for FeaturePipelineResp. +type FeaturePipelineResp struct { + ExecutionHistory *[]FeaturePipelineExecution `json:"executionHistory,omitempty"` + PipelineConfigured bool `json:"pipelineConfigured"` + + // A pipeline configured to update a feature + PipelineDetails *FeaturePipeline `json:"pipelineDetails,omitempty"` + PipelineErrorReason *string `json:"pipelineErrorReason,omitempty"` + PipelineErrorState *bool `json:"pipelineErrorState,omitempty"` +} + +// FeatureResponseMetadata defines model for FeatureResponseMetadata. +type FeatureResponseMetadata struct { + // Additional metadata about the request + Details *struct { + // Summary of governance checks including any warnings + GovernanceMetadata *map[string]interface{} `json:"governanceMetadata,omitempty"` + + // Info about the pipeline whether a pipeline was triggered + PipelineMetadata *struct { + // The ID of the pipeline execution + PipelineExecutionId *string `json:"pipelineExecutionId,omitempty"` + + // Whether a pipeline was triggered + PipelineTriggered *bool `json:"pipelineTriggered,omitempty"` + } `json:"pipelineMetadata,omitempty"` + } `json:"details,omitempty"` +} + +// The state of a flag either off or on +type FeatureState string -// FeatureStatus defines model for FeatureStatus. +// Indicates when the flag was last evaluated type FeatureStatus struct { - LastAccess int `json:"lastAccess"` - Status string `json:"status"` + LastAccess int `json:"lastAccess"` + Status FeatureStatusStatus `json:"status"` } +// FeatureStatusStatus defines model for FeatureStatus.Status. +type FeatureStatusStatus string + // Features defines model for Features. type Features struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded fields due to inline allOf schema - Features *[]Feature `json:"features,omitempty"` + FeatureCounts *FeatureCounts `json:"featureCounts,omitempty"` + Features *[]Feature `json:"features,omitempty"` + + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } -// FlagBasicInfo defines model for FlagBasicInfo. +// A flag Identifier and name type FlagBasicInfo struct { + // The flag identifier Identifier string `json:"identifier"` - Name string `json:"name"` + + // The user friendly flag name + Name string `json:"name"` } // FlagBasicInfos defines model for FlagBasicInfos. type FlagBasicInfos struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded fields due to inline allOf schema FeatureFlags *[]FlagBasicInfo `json:"featureFlags,omitempty"` + + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } -// GitDetails defines model for GitDetails. +// The commit message to use as part of a gitsync operation type GitDetails struct { + // A description of the change or action CommitMsg string `json:"commitMsg"` } -// GitRepo defines model for GitRepo. +// The git repository that has been configured for the feature flag project type GitRepo struct { - AutoCommit *bool `json:"autoCommit,omitempty"` - Branch string `json:"branch"` - Enabled *bool `json:"enabled,omitempty"` - FilePath string `json:"filePath"` - LastSync *int64 `json:"lastSync,omitempty"` - ObjectId string `json:"objectId"` + // Should all flag changes be automatically committed + AutoCommit *bool `json:"autoCommit,omitempty"` + + // The branch where feature flag commits will be pushed + Branch string `json:"branch"` + + // Indicates if feature flag changes will be saved to the repository + Enabled *bool `json:"enabled,omitempty"` + + // The path within the rootFolder to store the flags + FilePath string `json:"filePath"` + + // The last date and time that the feature flags were synced to git in milliseconds + LastSync *int64 `json:"lastSync,omitempty"` + + // The objectId + ObjectId string `json:"objectId"` + + // The identifier for the git repository RepoIdentifier string `json:"repoIdentifier"` - RootFolder string `json:"rootFolder"` + + // The root folder in the repository where the feature flag yaml will be written + RootFolder string `json:"rootFolder"` + + // An error message describing any problems with the generated yaml + YamlError *string `json:"yamlError,omitempty"` } // GitRepoResp defines model for GitRepoResp. type GitRepoResp struct { + // The git repository that has been configured for the feature flag project RepoDetails *GitRepo `json:"repoDetails,omitempty"` RepoSet bool `json:"repoSet"` } // GitSyncPatchOperation defines model for GitSyncPatchOperation. type GitSyncPatchOperation struct { + // A comment explaining the reason for this patch operation Comment *string `json:"comment,omitempty"` // Time of execution in unix epoch milliseconds when the scheduled changes will be applied - ExecutionTime *int `json:"executionTime,omitempty"` - GitDetails *GitDetails `json:"gitDetails,omitempty"` - Instructions PatchInstruction `json:"instructions"` + ExecutionTime *int `json:"executionTime,omitempty"` + + // The commit message to use as part of a gitsync operation + GitDetails *GitDetails `json:"gitDetails,omitempty"` + + // A list of Patch Instructions + Instructions PatchInstruction `json:"instructions"` } -// A pair of object id and object body +// An object id and object body generated from an audit event type ObjectSnapshot struct { - Id string `json:"id"` + // The identifier of the object e.g. the feature flag identifier or the target identifier + Id string `json:"id"` + + // A JSON representative of the object that was modified Value *map[string]interface{} `json:"value,omitempty"` } -// ObjectSnapshots defines model for ObjectSnapshots. +// A list of Object Snapshots type ObjectSnapshots struct { Objectsnapshots *[]ObjectSnapshot `json:"objectsnapshots,omitempty"` } // Pagination defines model for Pagination. type Pagination struct { - ItemCount int `json:"itemCount"` - PageCount int `json:"pageCount"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Version *int `json:"version,omitempty"` -} + // The total number of items + ItemCount int `json:"itemCount"` -// PatchInstruction defines model for PatchInstruction. -type PatchInstruction []struct { + // The total number of pages + PageCount int `json:"pageCount"` + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` +} + +// A list of Patch Instructions +type PatchInstruction = []struct { // The name of the modification you would like to perform on a resource. Kind string `json:"kind"` Parameters map[string]interface{} `json:"parameters"` @@ -254,539 +808,700 @@ type PatchInstruction []struct { // PatchOperation defines model for PatchOperation. type PatchOperation struct { + // A comment explaining the reason for this patch operation Comment *string `json:"comment,omitempty"` // Time of execution in unix epoch milliseconds when the scheduled changes will be applied - ExecutionTime *int `json:"executionTime,omitempty"` - Instructions PatchInstruction `json:"instructions"` + ExecutionTime *int `json:"executionTime,omitempty"` + + // A list of Patch Instructions + Instructions PatchInstruction `json:"instructions"` } -// Prerequisite defines model for Prerequisite. +// Feature Flag pre-requisites type Prerequisite struct { - Feature string `json:"feature"` + // The feature identifier that is the prerequisite + Feature string `json:"feature"` + + // A list of variations that must be met Variations []string `json:"variations"` } -// Project defines model for Project. +// A project response type Project struct { + // The project description Description *string `json:"description,omitempty"` - Identifier string `json:"identifier"` - Name string `json:"name"` - Tags *[]Tag `json:"tags,omitempty"` + + // The unique identifier for this project + Identifier string `json:"identifier"` + + // The user friendly name for the project + Name string `json:"name"` + + // A list of tags for this project + Tags *[]Tag `json:"tags,omitempty"` } -// Projects defines model for Projects. +// A list of projects type Projects struct { - ItemCount *int `json:"itemCount,omitempty"` - PageCount *int `json:"pageCount,omitempty"` - PageIndex *int `json:"pageIndex,omitempty"` - PageSize *int `json:"pageSize,omitempty"` - Projects *[]Project `json:"projects,omitempty"` + // The total number of items + ItemCount *int `json:"itemCount,omitempty"` + + // The total number of pages + PageCount *int `json:"pageCount,omitempty"` + + // The current page + PageIndex *int `json:"pageIndex,omitempty"` + + // The number of items per page + PageSize *int `json:"pageSize,omitempty"` + + // A list of projects + Projects *[]Project `json:"projects,omitempty"` } -// Results defines model for Results. +// ReferenceDTO defines model for ReferenceDTO. +type ReferenceDTO struct { + // The account which this reference belongs to + AccountIdentifier *string `json:"accountIdentifier,omitempty"` + + // The unique identifier for this reference + Identifier *string `json:"identifier,omitempty"` + + // The name of the reference + Name *string `json:"name,omitempty"` + + // The organization which this reference belongs to + OrgIdentifier *string `json:"orgIdentifier,omitempty"` + + // The project which this reference belongs to + ProjectIdentifier *string `json:"projectIdentifier,omitempty"` +} + +// This result object shows details of how many times a variation has been evaluated type Results struct { - Count int `json:"count"` + // The number of times this variation has been returned in a evaluation + Count int `json:"count"` + + // The unique variation identifier VariationIdentifier string `json:"variationIdentifier"` - VariationName string `json:"variationName"` + + // The user friendly variation name + VariationName string `json:"variationName"` } -// Segment defines model for Segment. +// A Target Group (Segment) response type Segment struct { - CreatedAt *int64 `json:"createdAt,omitempty"` - Environment *string `json:"environment,omitempty"` - Excluded *[]Target `json:"excluded,omitempty"` + // The data and time in milliseconds when the group was created + CreatedAt *int64 `json:"createdAt,omitempty"` - // Unique identifier for the segment. - Identifier string `json:"identifier"` - Included *[]Target `json:"included,omitempty"` - ModifiedAt *int64 `json:"modifiedAt,omitempty"` + // The environment this target group belongs to + Environment *string `json:"environment,omitempty"` - // Name of the segment. + // A list of Targets who are excluded from this target group + Excluded *[]Target `json:"excluded,omitempty"` + + // Unique identifier for the target group. + Identifier string `json:"identifier"` + + // A list of Targets who belong to this target group + Included *[]Target `json:"included,omitempty"` + + // The data and time in milliseconds when the group was last modified + ModifiedAt *int64 `json:"modifiedAt,omitempty"` + + // Name of the target group. Name string `json:"name"` // An array of rules that can cause a user to be included in this segment. - Rules *[]Clause `json:"rules,omitempty"` - Tags *[]Tag `json:"tags,omitempty"` - Version *int64 `json:"version,omitempty"` + Rules *[]Clause `json:"rules,omitempty"` + + // Tags for this target group + Tags *[]Tag `json:"tags,omitempty"` + + // The version of this group. Each time it is modified the version is incremented + Version *int64 `json:"version,omitempty"` } -// SegmentFlag defines model for SegmentFlag. +// Details of a Feature Flag that has been included in a Target Group (Segment) type SegmentFlag struct { + // A description of the feature flag Description *string `json:"description,omitempty"` - Environment string `json:"environment"` - Identifier string `json:"identifier"` - Name string `json:"name"` - Project string `json:"project"` - Type string `json:"type"` - Variation string `json:"variation"` + + // The environment identifier for the feature flag + Environment string `json:"environment"` + + // The identifier of the feature flag + Identifier string `json:"identifier"` + + // The name of the feature flag + Name string `json:"name"` + + // The project identifier for the feature flag + Project string `json:"project"` + + // The unique identifier for this rule + RuleId *string `json:"ruleId,omitempty"` + + // How the the flag has been included, either directly or via a custom rule + Type SegmentFlagType `json:"type"` + + // The identifier for the variation of the flag that should be served to members of the group + Variation string `json:"variation"` } +// How the the flag has been included, either directly or via a custom rule +type SegmentFlagType string + // Segments defines model for Segments. type Segments struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded fields due to inline allOf schema + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` Segments *[]Segment `json:"segments,omitempty"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } -// Serve defines model for Serve. +// Describe the distribution rule and the variation that should be served to the target type Serve struct { + // Describes a distribution rule Distribution *Distribution `json:"distribution,omitempty"` Variation *string `json:"variation,omitempty"` } -// ServingRule defines model for ServingRule. +// A Harness service linked to a flag +type Service struct { + // The identifier of the service + Identifier string `json:"identifier"` + + // The name of the service + Name string `json:"name"` +} + +// The rule used to determine what variation to serve to a target type ServingRule struct { - Clauses []Clause `json:"clauses"` - Priority int `json:"priority"` - RuleId string `json:"ruleId"` - Serve Serve `json:"serve"` + // A list of clauses to use in the rule + Clauses []Clause `json:"clauses"` + + // The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest + Priority int `json:"priority"` + + // The unique identifier for this rule + RuleId *string `json:"ruleId,omitempty"` + + // Describe the distribution rule and the variation that should be served to the target + Serve Serve `json:"serve"` } -// Status defines model for Status. +// Indicates if the request was successful or not type Status string -// List of Status -const ( - Status_ERROR Status = "ERROR" - Status_FAILURE Status = "FAILURE" - Status_SUCCESS Status = "SUCCESS" -) - -// A name and value pair. +// A tag has a name and value type Tag struct { - Name string `json:"name"` + // The name of the tag + Name string `json:"name"` + + // The value of the tag Value *string `json:"value,omitempty"` } -// Target defines model for Target. +// A Target object type Target struct { - Account string `json:"account"` - Anonymous *bool `json:"anonymous,omitempty"` - Attributes *map[string]interface{} `json:"attributes,omitempty"` - CreatedAt *int64 `json:"createdAt,omitempty"` - Environment string `json:"environment"` - Identifier string `json:"identifier"` - Name string `json:"name"` - Org string `json:"org"` - Project string `json:"project"` - Segments *[]Segment `json:"segments,omitempty"` -} - -// TargetAndSegment defines model for TargetAndSegment. + // The account ID that the target belongs to + Account string `json:"account"` + + // Indicates if this target is anonymous + Anonymous *bool `json:"anonymous,omitempty"` + + // a JSON representation of the attributes for this target + Attributes *map[string]interface{} `json:"attributes,omitempty"` + + // The date and time in milliseconds when this Target was created + CreatedAt *int64 `json:"createdAt,omitempty"` + + // The identifier for the environment that the target belongs to + Environment string `json:"environment"` + + // The unique identifier for this target + Identifier string `json:"identifier"` + + // The name of this Target + Name string `json:"name"` + + // The identifier for the organization that the target belongs to + Org string `json:"org"` + + // The identifier for the project that this target belongs to + Project string `json:"project"` + + // A list of Target Groups (Segments) that this Target belongs to + Segments *[]Segment `json:"segments,omitempty"` +} + +// A Target or Target Group (Segments) type TargetAndSegment struct { + // The unique identifier for the target or target group Identifier *string `json:"identifier,omitempty"` - Name *string `json:"name,omitempty"` - Type string `json:"type"` + + // The name of the entity + Name *string `json:"name,omitempty"` + + // The type either target or segment (target group) + Type TargetAndSegmentType `json:"type"` } -// TargetDetail defines model for TargetDetail. +// The type either target or segment (target group) +type TargetAndSegmentType string + +// Details of which Target Groups (Segments) a target is included in or excluded from type TargetDetail struct { + // A list of target groups (segments) that the target is excluded from. ExcludedSegments *[]TargetDetailSegment `json:"excludedSegments,omitempty"` - Identifier *string `json:"identifier,omitempty"` + + // The unique identifier for the target + Identifier string `json:"identifier"` + + // A list of target groups (segments) that the target is included in. IncludedSegments *[]TargetDetailSegment `json:"includedSegments,omitempty"` - RuleSegments *[]TargetDetailSegment `json:"ruleSegments,omitempty"` + + // A list of target groups (segments) that the target is included in via group rules. + RuleSegments *[]TargetDetailSegment `json:"ruleSegments,omitempty"` } // TargetDetailSegment defines model for TargetDetailSegment. type TargetDetailSegment struct { + // The unique identifier Identifier *string `json:"identifier,omitempty"` - Name *string `json:"name,omitempty"` + + // The name + Name *string `json:"name,omitempty"` } -// TargetMap defines model for TargetMap. +// Target map provides the details of a target that belongs to a flag type TargetMap struct { - Identifier *string `json:"identifier,omitempty"` - Name string `json:"name"` + // The identifier for the target + Identifier string `json:"identifier"` + + // The name of the target + Name string `json:"name"` } // Targets defines model for Targets. type Targets struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded fields due to inline allOf schema - Targets *[]Target `json:"targets,omitempty"` + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + Targets *[]Target `json:"targets,omitempty"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } // TargetsAndSegments defines model for TargetsAndSegments. type TargetsAndSegments struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded fields due to inline allOf schema Entities *[]TargetAndSegment `json:"entities,omitempty"` + + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } // TargetsAndSegmentsInfo defines model for TargetsAndSegmentsInfo. type TargetsAndSegmentsInfo struct { - // Embedded fields due to inline allOf schema Entities *[]TargetAndSegment `json:"entities,omitempty"` } -// Variation defines model for Variation. +// UsageDataDTO defines model for UsageDataDTO. +type UsageDataDTO struct { + // The number of times the resource has been used + Count *int64 `json:"count,omitempty"` + + // The name of the resource + DisplayName *string `json:"displayName,omitempty"` + + // References to who used the resource + References *[]ReferenceDTO `json:"references,omitempty"` +} + +// A variation of a flag that can be returned to a target type Variation struct { + // A description of the variation Description *string `json:"description,omitempty"` - Identifier string `json:"identifier"` - Name *string `json:"name,omitempty"` - Value string `json:"value"` + + // The unique identifier for the variation + Identifier string `json:"identifier"` + + // The user friendly name of the variation + Name *string `json:"name,omitempty"` + + // The variation value to serve such as true or false for a boolean flag + Value string `json:"value"` } -// VariationMap defines model for VariationMap. +// A mapping of variations to targets and target groups (segments). The targets listed here should receive this variation. type VariationMap struct { - TargetSegments *[]string `json:"targetSegments,omitempty"` - Targets *[]TargetMap `json:"targets,omitempty"` - Variation string `json:"variation"` + // A list of target groups (segments) + TargetSegments *[]string `json:"targetSegments,omitempty"` + + // A list of target mappings + Targets *[]TargetMap `json:"targets,omitempty"` + + // The variation identifier + Variation string `json:"variation"` } -// WeightedVariation defines model for WeightedVariation. +// A variation and the weighting it should receive as part of a percentage rollout type WeightedVariation struct { + // The variation identifier Variation string `json:"variation"` - Weight int `json:"weight"` + + // The weight to be given to the variation in percent + Weight int `json:"weight"` } // AccountQueryParam defines model for accountQueryParam. -type AccountQueryParam string +type AccountQueryParam = string // ActionQueryParam defines model for actionQueryParam. -type ActionQueryParam []string +type ActionQueryParam = []string // ActorQueryParam defines model for actorQueryParam. -type ActorQueryParam string +type ActorQueryParam = string // ArchivedQueryParam defines model for archivedQueryParam. -type ArchivedQueryParam bool +type ArchivedQueryParam = bool // AuditSortByField defines model for auditSortByField. type AuditSortByField string -// List of AuditSortByField -const ( - AuditSortByField_action AuditSortByField = "action" - AuditSortByField_actor AuditSortByField = "actor" - AuditSortByField_executed_on AuditSortByField = "executed_on" -) - // AuditSortOrder defines model for auditSortOrder. type AuditSortOrder string -// List of AuditSortOrder -const ( - AuditSortOrder_ASC AuditSortOrder = "ASC" - AuditSortOrder_DESC AuditSortOrder = "DESC" -) - // CommitMsgQueryParam defines model for commitMsgQueryParam. -type CommitMsgQueryParam string +type CommitMsgQueryParam = string // EndTimeQueryParam defines model for endTimeQueryParam. -type EndTimeQueryParam int +type EndTimeQueryParam = int // EnvironmentOptionalQueryParam defines model for environmentOptionalQueryParam. -type EnvironmentOptionalQueryParam string +type EnvironmentOptionalQueryParam = string // EnvironmentQueryParam defines model for environmentQueryParam. -type EnvironmentQueryParam string +type EnvironmentQueryParam = string + +// ExcludedFeaturesOptionalParam defines model for excludedFeaturesOptionalParam. +type ExcludedFeaturesOptionalParam = string // FeatureIDs defines model for featureIDs. -type FeatureIDs []string +type FeatureIDs = []string + +// FeaturesOptionalParam defines model for featuresOptionalParam. +type FeaturesOptionalParam = string + +// FlagCounts defines model for flagCounts. +type FlagCounts = bool + +// FlagEnabled defines model for flagEnabled. +type FlagEnabled = bool + +// FlagLifetime defines model for flagLifetime. +type FlagLifetime = string // FlagNameQueryParam defines model for flagNameQueryParam. -type FlagNameQueryParam string +type FlagNameQueryParam = string + +// FlagStatus defines model for flagStatus. +type FlagStatus = string // Identifier defines model for identifier. -type Identifier string +type Identifier = string // IdentifierOptionalQueryParam defines model for identifierOptionalQueryParam. -type IdentifierOptionalQueryParam string +type IdentifierOptionalQueryParam = string // IdentifierQueryParam defines model for identifierQueryParam. -type IdentifierQueryParam string +type IdentifierQueryParam = string // Identifiers defines model for identifiers. -type Identifiers []string +type Identifiers = []string // KindQueryParam defines model for kindQueryParam. type KindQueryParam string -// List of KindQueryParam -const ( - KindQueryParam__int KindQueryParam = "int" - KindQueryParam__string KindQueryParam = "string" - KindQueryParam_boolean KindQueryParam = "boolean" - KindQueryParam_json KindQueryParam = "json" -) - // MetricsOptionalParam defines model for metricsOptionalParam. -type MetricsOptionalParam bool +type MetricsOptionalParam = bool // NameQueryParam defines model for nameQueryParam. -type NameQueryParam string +type NameQueryParam = string // ObjectTypeQueryParam defines model for objectTypeQueryParam. type ObjectTypeQueryParam string -// List of ObjectTypeQueryParam -const ( - ObjectTypeQueryParam_FeatureActivation ObjectTypeQueryParam = "FeatureActivation" - ObjectTypeQueryParam_Segment ObjectTypeQueryParam = "Segment" -) - // OrgQueryParam defines model for orgQueryParam. -type OrgQueryParam string +type OrgQueryParam = string // PageNumber defines model for pageNumber. -type PageNumber int +type PageNumber = int // PageSize defines model for pageSize. -type PageSize int +type PageSize = int + +// PipelineNameQueryParam defines model for pipelineNameQueryParam. +type PipelineNameQueryParam = string // ProjectOptionalQueryParam defines model for projectOptionalQueryParam. -type ProjectOptionalQueryParam string +type ProjectOptionalQueryParam = string // ProjectQueryParam defines model for projectQueryParam. -type ProjectQueryParam string +type ProjectQueryParam = string // SafSortByField defines model for safSortByField. type SafSortByField string -// List of SafSortByField -const ( - SafSortByField_name SafSortByField = "name" -) - // SafSortOrder defines model for safSortOrder. type SafSortOrder string -// List of SafSortOrder -const ( - SafSortOrder_ASCENDING SafSortOrder = "ASCENDING" - SafSortOrder_DESCENDING SafSortOrder = "DESCENDING" -) - // SegmentNameQueryParam defines model for segmentNameQueryParam. -type SegmentNameQueryParam string +type SegmentNameQueryParam = string // SortByField defines model for sortByField. type SortByField string -// List of SortByField -const ( - SortByField_archived SortByField = "archived" - SortByField_identifier SortByField = "identifier" - SortByField_kind SortByField = "kind" - SortByField_modifiedAt SortByField = "modifiedAt" - SortByField_name SortByField = "name" -) - // SortOrder defines model for sortOrder. type SortOrder string -// List of SortOrder -const ( - SortOrder_ASCENDING SortOrder = "ASCENDING" - SortOrder_DESCENDING SortOrder = "DESCENDING" -) - // StartTimeQueryParam defines model for startTimeQueryParam. -type StartTimeQueryParam int +type StartTimeQueryParam = int + +// TargetFilterOptionalParam defines model for targetFilterOptionalParam. +type TargetFilterOptionalParam = string // TargetGroupsOptionalParam defines model for targetGroupsOptionalParam. -type TargetGroupsOptionalParam string +type TargetGroupsOptionalParam = string // TargetIdentifierQueryParam defines model for targetIdentifierQueryParam. -type TargetIdentifierQueryParam string +type TargetIdentifierQueryParam = string // TargetNameQueryParam defines model for targetNameQueryParam. -type TargetNameQueryParam string +type TargetNameQueryParam = string // TargetOptionalParam defines model for targetOptionalParam. -type TargetOptionalParam string +type TargetOptionalParam = string // TargetSortByField defines model for targetSortByField. type TargetSortByField string -// List of TargetSortByField -const ( - TargetSortByField_createdAt TargetSortByField = "createdAt" - TargetSortByField_identifier TargetSortByField = "identifier" - TargetSortByField_name TargetSortByField = "name" -) - // TargetSortOrder defines model for targetSortOrder. type TargetSortOrder string -// List of TargetSortOrder -const ( - TargetSortOrder_ASC TargetSortOrder = "ASC" - TargetSortOrder_DESC TargetSortOrder = "DESC" -) - // TargetsOptionalParam defines model for targetsOptionalParam. -type TargetsOptionalParam string +type TargetsOptionalParam = string // TasSortByField defines model for tasSortByField. type TasSortByField string -// List of TasSortByField -const ( - TasSortByField_name TasSortByField = "name" -) - // TasSortOrder defines model for tasSortOrder. type TasSortOrder string -// List of TasSortOrder -const ( - TasSortOrder_ASCENDING TasSortOrder = "ASCENDING" - TasSortOrder_DESCENDING TasSortOrder = "DESCENDING" -) +// Timestamp defines model for timestamp. +type Timestamp = int64 // TsIdentifierQueryParam defines model for tsIdentifierQueryParam. -type TsIdentifierQueryParam string +type TsIdentifierQueryParam = string // TsNameQueryParam defines model for tsNameQueryParam. -type TsNameQueryParam string +type TsNameQueryParam = string // TsSortByField defines model for tsSortByField. type TsSortByField string -// List of TsSortByField -const ( - TsSortByField_identifier TsSortByField = "identifier" - TsSortByField_name TsSortByField = "name" -) - // TsSortOrder defines model for tsSortOrder. type TsSortOrder string -// List of TsSortOrder -const ( - TsSortOrder_ASC TsSortOrder = "ASC" - TsSortOrder_DESC TsSortOrder = "DESC" -) +// The API key is used by SDKs to connect to Harness Feature Flags +type APIKeyResponse = ApiKey -// APIKeyResponse defines model for APIKeyResponse. -type APIKeyResponse ApiKey - -// APIKeysResponse defines model for APIKeysResponse. -type APIKeysResponse ApiKeys +// A list of API Keys +type APIKeysResponse = ApiKeys // AuditTrailResponse defines model for AuditTrailResponse. type AuditTrailResponse struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *AuditTrails `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of Audit Trail events + Data *AuditTrails `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } -// AvailableFlagResponse defines model for AvailableFlagResponse. -type AvailableFlagResponse FlagBasicInfos +// A list of Flags +type AvailableFlagResponse = FlagBasicInfos // BadRequest defines model for BadRequest. -type BadRequest Error +type BadRequest = Error // Conflict defines model for Conflict. -type Conflict Error +type Conflict = Error // EnvironmentResponse defines model for EnvironmentResponse. type EnvironmentResponse struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Environment `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // Environment Response + Data *Environment `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } // EnvironmentsResponse defines model for EnvironmentsResponse. type EnvironmentsResponse struct { - CorrelationId string `json:"correlationId"` - Data Environments `json:"data"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status Status `json:"status"` + CorrelationId string `json:"correlationId"` + + // A list of Environments + Data Environments `json:"data"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status Status `json:"status"` } -// FeatureEvaluationsResponse defines model for FeatureEvaluationsResponse. -type FeatureEvaluationsResponse FeatureEvaluations +// A list of Available Pipelines +type FeatureAvailablePipelinesResponse = FeatureAvailablePipelines + +// FeatureEditResponse defines model for FeatureEditResponse. +type FeatureEditResponse = FeatureResponseMetadata + +// A list of Feature Evaluations +type FeatureEvaluationsResponse = FeatureEvaluations + +// A list of FeatureMetrics +type FeatureMetricsResponse = FeatureMetrics -// FeatureMetricsResponse defines model for FeatureMetricsResponse. -type FeatureMetricsResponse FeatureMetrics +// FeaturePipelineResponse defines model for FeaturePipelineResponse. +type FeaturePipelineResponse = FeaturePipelineResp -// FeatureResponse defines model for FeatureResponse. -type FeatureResponse Feature +// A Feature Flag response +type FeatureResponse = Feature // Feature flags yaml for a project -type FeatureYamlResponse FeatureFlagsYaml +type FeatureYamlResponse = FeatureFlagsYaml -// FeaturesResponse defines model for FeaturesResponse. -type FeaturesResponse Features +// A list of Feature Flags +type FeaturesResponse = Features // GitRepoResponse defines model for GitRepoResponse. -type GitRepoResponse GitRepoResp +type GitRepoResponse = GitRepoResp // GitSyncError defines model for GitSyncError. -type GitSyncError Error +type GitSyncError = Error // InternalServerError defines model for InternalServerError. -type InternalServerError Error +type InternalServerError = Error // NotFound defines model for NotFound. -type NotFound Error +type NotFound = Error // ObjectSnapshotResponse defines model for ObjectSnapshotResponse. type ObjectSnapshotResponse struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *ObjectSnapshots `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of Object Snapshots + Data *ObjectSnapshots `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } // ProjectResponse defines model for ProjectResponse. type ProjectResponse struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Project `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A project response + Data *Project `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } // ProjectsResponse defines model for ProjectsResponse. type ProjectsResponse struct { - CorrelationId *string `json:"correlationId,omitempty"` - Data *Projects `json:"data,omitempty"` - MetaData *map[string]interface{} `json:"metaData,omitempty"` - Status *Status `json:"status,omitempty"` + CorrelationId *string `json:"correlationId,omitempty"` + + // A list of projects + Data *Projects `json:"data,omitempty"` + MetaData *map[string]interface{} `json:"metaData,omitempty"` + + // Indicates if the request was successful or not + Status *Status `json:"status,omitempty"` } // SegmentFlagsResponse defines model for SegmentFlagsResponse. -type SegmentFlagsResponse []SegmentFlag +type SegmentFlagsResponse = []SegmentFlag -// SegmentResponse defines model for SegmentResponse. -type SegmentResponse Segment +// A Target Group (Segment) response +type SegmentResponse = Segment -// SegmentsResponse defines model for SegmentsResponse. -type SegmentsResponse Segments +// A list of Target Groups (Segments) +type SegmentsResponse = Segments // TargetAttributes defines model for TargetAttributes. -type TargetAttributes []string +type TargetAttributes = []string -// TargetDetailResponse defines model for TargetDetailResponse. -type TargetDetailResponse TargetDetail +// Details of which Target Groups (Segments) a target is included in or excluded from +type TargetDetailResponse = TargetDetail -// TargetResponse defines model for TargetResponse. -type TargetResponse Target +// A Target object +type TargetResponse = Target -// TargetSegmentResponse defines model for TargetSegmentResponse. -type TargetSegmentResponse TargetsAndSegments +// A list of Target and Target Groups (Segments) +type TargetSegmentResponse = TargetsAndSegments -// TargetSegmentsInfoResponse defines model for TargetSegmentsInfoResponse. -type TargetSegmentsInfoResponse TargetsAndSegmentsInfo +// A list of Target and Target Groups (Segments) +type TargetSegmentsInfoResponse = TargetsAndSegmentsInfo -// TargetsResponse defines model for TargetsResponse. -type TargetsResponse Targets +// A list of Targets +type TargetsResponse = Targets // Unauthenticated defines model for Unauthenticated. -type Unauthenticated Error +type Unauthenticated = Error // Unauthorized defines model for Unauthorized. -type Unauthorized Error +type Unauthorized = Error // APIKeyRequest defines model for APIKeyRequest. type APIKeyRequest struct { @@ -794,7 +1509,9 @@ type APIKeyRequest struct { ExpiredAt *int `json:"expiredAt,omitempty"` Identifier string `json:"identifier"` Name string `json:"name"` - Type string `json:"type"` + + // The type of key depending on the SDK that is being used. + Type ApiKeyRequestType `json:"type"` } // APIKeyUpdateRequest defines model for APIKeyUpdateRequest. @@ -815,30 +1532,39 @@ type EnvironmentRequest struct { // FeatureFlagRequest defines model for FeatureFlagRequest. type FeatureFlagRequest struct { - Archived *bool `json:"archived,omitempty"` - DefaultOffVariation string `json:"defaultOffVariation"` - DefaultOnVariation string `json:"defaultOnVariation"` - Description *string `json:"description,omitempty"` - GitDetails *GitDetails `json:"gitDetails,omitempty"` - Identifier string `json:"identifier"` - Kind string `json:"kind"` - Name string `json:"name"` - Owner *string `json:"owner,omitempty"` - Permanent bool `json:"permanent"` - Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"` - Project string `json:"project"` - Tags *[]Tag `json:"tags,omitempty"` - Variations []Variation `json:"variations"` + Archived *bool `json:"archived,omitempty"` + DefaultOffVariation string `json:"defaultOffVariation"` + DefaultOnVariation string `json:"defaultOnVariation"` + Description *string `json:"description,omitempty"` + + // The commit message to use as part of a gitsync operation + GitDetails *GitDetails `json:"gitDetails,omitempty"` + Identifier string `json:"identifier"` + Kind FeatureFlagRequestKind `json:"kind"` + Name string `json:"name"` + Owner *string `json:"owner,omitempty"` + Permanent bool `json:"permanent"` + Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"` + Project string `json:"project"` + Services *[]Service `json:"services,omitempty"` + Tags *[]Tag `json:"tags,omitempty"` + Variations []Variation `json:"variations"` } // FeaturePatchRequest defines model for FeaturePatchRequest. -type FeaturePatchRequest GitSyncPatchOperation +type FeaturePatchRequest = GitSyncPatchOperation + +// FeaturePipelineRequest defines model for FeaturePipelineRequest. +type FeaturePipelineRequest struct { + PipelineIdentifier string `json:"pipelineIdentifier"` + PipelineName string `json:"pipelineName"` +} // Feature flags yaml for a project -type FeatureYamlRequest FeatureFlagsYaml +type FeatureYamlRequest = FeatureFlagsYaml // GitRepoPatchRequest defines model for GitRepoPatchRequest. -type GitRepoPatchRequest PatchOperation +type GitRepoPatchRequest = PatchOperation // GitRepoRequest defines model for GitRepoRequest. type GitRepoRequest struct { @@ -859,7 +1585,7 @@ type ProjectRequest struct { } // SegmentPatchRequest defines model for SegmentPatchRequest. -type SegmentPatchRequest PatchOperation +type SegmentPatchRequest = GitSyncPatchOperation // SegmentRequest defines model for SegmentRequest. type SegmentRequest struct { @@ -878,870 +1604,996 @@ type SegmentRequest struct { } // TargetPatchRequest defines model for TargetPatchRequest. -type TargetPatchRequest PatchOperation +type TargetPatchRequest = GitSyncPatchOperation -// TargetRequest defines model for TargetRequest. -type TargetRequest Target +// A Target object +type TargetRequest = Target // GetAllAPIKeysParams defines parameters for GetAllAPIKeys. type GetAllAPIKeysParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` } // AddAPIKeyParams defines parameters for AddAPIKey. type AddAPIKeyParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` } -// DeleteApiKeyParams defines parameters for DeleteApiKey. -type DeleteApiKeyParams struct { - - // Project - Project ProjectQueryParam `json:"project"` +// DeleteAPIKeyParams defines parameters for DeleteAPIKey. +type DeleteAPIKeyParams struct { + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // GetAPIKeyParams defines parameters for GetAPIKey. type GetAPIKeyParams struct { + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` - - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // UpdateAPIKeyParams defines parameters for UpdateAPIKey. type UpdateAPIKeyParams struct { + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` - - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // GetAuditByParamsParams defines parameters for GetAuditByParams. type GetAuditByParamsParams struct { - // Environment - Environment *EnvironmentOptionalQueryParam `json:"environment,omitempty"` + EnvironmentIdentifier *EnvironmentOptionalQueryParam `form:"environmentIdentifier,omitempty" json:"environmentIdentifier,omitempty"` // Project - Project *ProjectOptionalQueryParam `json:"project,omitempty"` + ProjectIdentifier *ProjectOptionalQueryParam `form:"projectIdentifier,omitempty" json:"projectIdentifier,omitempty"` // Object Type (FeatureActivation Or Segment) - ObjectType ObjectTypeQueryParam `json:"objectType"` + ObjectType GetAuditByParamsParamsObjectType `form:"objectType" json:"objectType"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Start Time - StartTime *StartTimeQueryParam `json:"startTime,omitempty"` + StartTime *StartTimeQueryParam `form:"startTime,omitempty" json:"startTime,omitempty"` // End Time - EndTime *EndTimeQueryParam `json:"endTime,omitempty"` + EndTime *EndTimeQueryParam `form:"endTime,omitempty" json:"endTime,omitempty"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // Actor - Actor *ActorQueryParam `json:"actor,omitempty"` + Actor *ActorQueryParam `form:"actor,omitempty" json:"actor,omitempty"` // Action - Action *ActionQueryParam `json:"action,omitempty"` + Action *ActionQueryParam `form:"action,omitempty" json:"action,omitempty"` // Identifier of the entity - Identifier *IdentifierOptionalQueryParam `json:"identifier,omitempty"` + Identifier *IdentifierOptionalQueryParam `form:"identifier,omitempty" json:"identifier,omitempty"` // SortOrder - SortOrder *AuditSortOrder `json:"sortOrder,omitempty"` + SortOrder *GetAuditByParamsParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *AuditSortByField `json:"sortByField,omitempty"` + SortByField *GetAuditByParamsParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` } +// GetAuditByParamsParamsObjectType defines parameters for GetAuditByParams. +type GetAuditByParamsParamsObjectType string + +// GetAuditByParamsParamsAction defines parameters for GetAuditByParams. +type GetAuditByParamsParamsAction string + +// GetAuditByParamsParamsSortOrder defines parameters for GetAuditByParams. +type GetAuditByParamsParamsSortOrder string + +// GetAuditByParamsParamsSortByField defines parameters for GetAuditByParams. +type GetAuditByParamsParamsSortByField string + // GetAllEnvironmentsParams defines parameters for GetAllEnvironments. type GetAllEnvironmentsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // SortOrder - SortOrder *SortOrder `json:"sortOrder,omitempty"` + SortOrder *GetAllEnvironmentsParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *SortByField `json:"sortByField,omitempty"` + SortByField *GetAllEnvironmentsParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` } +// GetAllEnvironmentsParamsSortOrder defines parameters for GetAllEnvironments. +type GetAllEnvironmentsParamsSortOrder string + +// GetAllEnvironmentsParamsSortByField defines parameters for GetAllEnvironments. +type GetAllEnvironmentsParamsSortByField string + // CreateEnvironmentParams defines parameters for CreateEnvironment. type CreateEnvironmentParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // DeleteEnvironmentParams defines parameters for DeleteEnvironment. type DeleteEnvironmentParams struct { + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // GetEnvironmentParams defines parameters for GetEnvironment. type GetEnvironmentParams struct { + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // ModifyEnvironmentParams defines parameters for ModifyEnvironment. type ModifyEnvironmentParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` } // GetAllFeaturesParams defines parameters for GetAllFeatures. type GetAllFeaturesParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` // Environment - Environment *EnvironmentOptionalQueryParam `json:"environment,omitempty"` + EnvironmentIdentifier *EnvironmentOptionalQueryParam `form:"environmentIdentifier,omitempty" json:"environmentIdentifier,omitempty"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // SortOrder - SortOrder *SortOrder `json:"sortOrder,omitempty"` + SortOrder *GetAllFeaturesParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *SortByField `json:"sortByField,omitempty"` + SortByField *GetAllFeaturesParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` // Name of the field - Name *NameQueryParam `json:"name,omitempty"` + Name *NameQueryParam `form:"name,omitempty" json:"name,omitempty"` // Identifier of the field - Identifier *IdentifierQueryParam `json:"identifier,omitempty"` + Identifier *IdentifierQueryParam `form:"identifier,omitempty" json:"identifier,omitempty"` // Status of the feature flag - Archived *ArchivedQueryParam `json:"archived,omitempty"` + Archived *ArchivedQueryParam `form:"archived,omitempty" json:"archived,omitempty"` // Kind of the feature flag - Kind *KindQueryParam `json:"kind,omitempty"` + Kind *GetAllFeaturesParamsKind `form:"kind,omitempty" json:"kind,omitempty"` // Identifier of a target - TargetIdentifier *TargetOptionalParam `json:"targetIdentifier,omitempty"` + TargetIdentifier *TargetOptionalParam `form:"targetIdentifier,omitempty" json:"targetIdentifier,omitempty"` + + // Identifier of the target to filter on + TargetIdentifierFilter *TargetFilterOptionalParam `form:"targetIdentifierFilter,omitempty" json:"targetIdentifierFilter,omitempty"` // Parameter to indicate if metrics data is requested in response - Metrics *MetricsOptionalParam `json:"metrics,omitempty"` + Metrics *MetricsOptionalParam `form:"metrics,omitempty" json:"metrics,omitempty"` + + // Comma separated identifiers for multiple Features + FeatureIdentifiers *FeaturesOptionalParam `form:"featureIdentifiers,omitempty" json:"featureIdentifiers,omitempty"` + + // Comma separated identifiers to exclude from the response + ExcludedFeatures *ExcludedFeaturesOptionalParam `form:"excludedFeatures,omitempty" json:"excludedFeatures,omitempty"` + + // Filter for flags based on their status (active,never-requested,recently-accessed,potentially-stale) + Status *FlagStatus `form:"status,omitempty" json:"status,omitempty"` + + // Filter for flags based on their lifetime (permanent/temporary) + Lifetime *FlagLifetime `form:"lifetime,omitempty" json:"lifetime,omitempty"` + + // Filter for flags based on if they are enabled or disabled + Enabled *FlagEnabled `form:"enabled,omitempty" json:"enabled,omitempty"` + + // Returns counts for the different types of flags e.g num active, potentially-stale, recently-accessed etc + FlagCounts *FlagCounts `form:"flagCounts,omitempty" json:"flagCounts,omitempty"` } +// GetAllFeaturesParamsSortOrder defines parameters for GetAllFeatures. +type GetAllFeaturesParamsSortOrder string + +// GetAllFeaturesParamsSortByField defines parameters for GetAllFeatures. +type GetAllFeaturesParamsSortByField string + +// GetAllFeaturesParamsKind defines parameters for GetAllFeatures. +type GetAllFeaturesParamsKind string + // CreateFeatureFlagParams defines parameters for CreateFeatureFlag. type CreateFeatureFlagParams struct { + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Organization Identifier + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` +} + +// GetAvailableFeaturePipelinesParams defines parameters for GetAvailableFeaturePipelines. +type GetAvailableFeaturePipelinesParams struct { + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` + + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` + + // Filter for pipelines with specific name + PipelineName *PipelineNameQueryParam `form:"pipelineName,omitempty" json:"pipelineName,omitempty"` + + // PageNumber + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` + + // PageSize + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` } // GetFeatureMetricsParams defines parameters for GetFeatureMetrics. type GetFeatureMetricsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` // Unique feature identifiers - FeatureIDs FeatureIDs `json:"featureIDs"` + FeatureIDs FeatureIDs `form:"featureIDs" json:"featureIDs"` } // GetFlagsYamlParams defines parameters for GetFlagsYaml. type GetFlagsYamlParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` } // UpdateFlagsYamlParams defines parameters for UpdateFlagsYaml. type UpdateFlagsYamlParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` } // DeleteFeatureFlagParams defines parameters for DeleteFeatureFlag. type DeleteFeatureFlagParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` // Git commit message - CommitMsg *CommitMsgQueryParam `json:"commitMsg,omitempty"` + CommitMsg *CommitMsgQueryParam `form:"commitMsg,omitempty" json:"commitMsg,omitempty"` } // GetFeatureFlagParams defines parameters for GetFeatureFlag. type GetFeatureFlagParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` // Environment - Environment *EnvironmentOptionalQueryParam `json:"environment,omitempty"` + EnvironmentIdentifier *EnvironmentOptionalQueryParam `form:"environmentIdentifier,omitempty" json:"environmentIdentifier,omitempty"` } // PatchFeatureParams defines parameters for PatchFeature. type PatchFeatureParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` // Environment - Environment *EnvironmentOptionalQueryParam `json:"environment,omitempty"` + EnvironmentIdentifier *EnvironmentOptionalQueryParam `form:"environmentIdentifier,omitempty" json:"environmentIdentifier,omitempty"` } // GetFeatureEvaluationsParams defines parameters for GetFeatureEvaluations. type GetFeatureEvaluationsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` // Environment - Environment *EnvironmentOptionalQueryParam `json:"environment,omitempty"` + EnvironmentIdentifier *EnvironmentOptionalQueryParam `form:"environmentIdentifier,omitempty" json:"environmentIdentifier,omitempty"` // Start Time - StartTime *StartTimeQueryParam `json:"startTime,omitempty"` + StartTime *StartTimeQueryParam `form:"startTime,omitempty" json:"startTime,omitempty"` // End Time - EndTime *EndTimeQueryParam `json:"endTime,omitempty"` + EndTime *EndTimeQueryParam `form:"endTime,omitempty" json:"endTime,omitempty"` +} + +// DeleteFeaturePipelineParams defines parameters for DeleteFeaturePipeline. +type DeleteFeaturePipelineParams struct { + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` + + // Organization Identifier + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` + + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` + + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` +} + +// GetFeaturePipelineParams defines parameters for GetFeaturePipeline. +type GetFeaturePipelineParams struct { + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` + + // Organization Identifier + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` + + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` + + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` +} + +// PatchFeaturePipelineParams defines parameters for PatchFeaturePipeline. +type PatchFeaturePipelineParams struct { + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` + + // Organization Identifier + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` + + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` + + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` +} + +// CreateFlagPipelineParams defines parameters for CreateFlagPipeline. +type CreateFlagPipelineParams struct { + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` + + // Organization Identifier + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` + + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` + + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // GetAllProjectsParams defines parameters for GetAllProjects. type GetAllProjectsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // SortOrder - SortOrder *SortOrder `json:"sortOrder,omitempty"` + SortOrder *GetAllProjectsParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *SortByField `json:"sortByField,omitempty"` + SortByField *GetAllProjectsParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` } +// GetAllProjectsParamsSortOrder defines parameters for GetAllProjects. +type GetAllProjectsParamsSortOrder string + +// GetAllProjectsParamsSortByField defines parameters for GetAllProjects. +type GetAllProjectsParamsSortByField string + // CreateProjectParams defines parameters for CreateProject. type CreateProjectParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // DeleteProjectParams defines parameters for DeleteProject. type DeleteProjectParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // GetProjectParams defines parameters for GetProject. type GetProjectParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // ModifyProjectParams defines parameters for ModifyProject. type ModifyProjectParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // DeleteGitRepoParams defines parameters for DeleteGitRepo. type DeleteGitRepoParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // GetGitRepoParams defines parameters for GetGitRepo. type GetGitRepoParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // PatchGitRepoParams defines parameters for PatchGitRepo. type PatchGitRepoParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // CreateGitRepoParams defines parameters for CreateGitRepo. type CreateGitRepoParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // GetAllSegmentsParams defines parameters for GetAllSegments. type GetAllSegmentsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // SortOrder - SortOrder *SortOrder `json:"sortOrder,omitempty"` + SortOrder *GetAllSegmentsParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *SortByField `json:"sortByField,omitempty"` + SortByField *GetAllSegmentsParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` // Name of the field - Name *NameQueryParam `json:"name,omitempty"` + Name *NameQueryParam `form:"name,omitempty" json:"name,omitempty"` // Identifier of the field - Identifier *IdentifierQueryParam `json:"identifier,omitempty"` + Identifier *IdentifierQueryParam `form:"identifier,omitempty" json:"identifier,omitempty"` } +// GetAllSegmentsParamsSortOrder defines parameters for GetAllSegments. +type GetAllSegmentsParamsSortOrder string + +// GetAllSegmentsParamsSortByField defines parameters for GetAllSegments. +type GetAllSegmentsParamsSortByField string + // CreateSegmentParams defines parameters for CreateSegment. type CreateSegmentParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // DeleteSegmentParams defines parameters for DeleteSegment. type DeleteSegmentParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // GetSegmentParams defines parameters for GetSegment. type GetSegmentParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // PatchSegmentParams defines parameters for PatchSegment. type PatchSegmentParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // GetAvailableFlagsForSegmentParams defines parameters for GetAvailableFlagsForSegment. type GetAvailableFlagsForSegmentParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // SortOrder - SortOrder *SafSortOrder `json:"sortOrder,omitempty"` + SortOrder *GetAvailableFlagsForSegmentParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *SafSortByField `json:"sortByField,omitempty"` + SortByField *GetAvailableFlagsForSegmentParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` // Identifier of the feature flag - FlagNameIdentifier *FlagNameQueryParam `json:"flagNameIdentifier,omitempty"` + FlagNameIdentifier *FlagNameQueryParam `form:"flagNameIdentifier,omitempty" json:"flagNameIdentifier,omitempty"` } +// GetAvailableFlagsForSegmentParamsSortOrder defines parameters for GetAvailableFlagsForSegment. +type GetAvailableFlagsForSegmentParamsSortOrder string + +// GetAvailableFlagsForSegmentParamsSortByField defines parameters for GetAvailableFlagsForSegment. +type GetAvailableFlagsForSegmentParamsSortByField string + // GetSegmentFlagsParams defines parameters for GetSegmentFlags. type GetSegmentFlagsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // GetAllTargetsParams defines parameters for GetAllTargets. type GetAllTargetsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // SortOrder - SortOrder *TargetSortOrder `json:"sortOrder,omitempty"` + SortOrder *GetAllTargetsParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *TargetSortByField `json:"sortByField,omitempty"` + SortByField *GetAllTargetsParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` // Name of the target - TargetName *TargetNameQueryParam `json:"targetName,omitempty"` + TargetName *TargetNameQueryParam `form:"targetName,omitempty" json:"targetName,omitempty"` // Identifier of the target - TargetIdentifier *TargetIdentifierQueryParam `json:"targetIdentifier,omitempty"` + TargetIdentifier *TargetIdentifierQueryParam `form:"targetIdentifier,omitempty" json:"targetIdentifier,omitempty"` } +// GetAllTargetsParamsSortOrder defines parameters for GetAllTargets. +type GetAllTargetsParamsSortOrder string + +// GetAllTargetsParamsSortByField defines parameters for GetAllTargets. +type GetAllTargetsParamsSortByField string + // CreateTargetParams defines parameters for CreateTarget. type CreateTargetParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` } // GetTargetsAndSegmentsInfoParams defines parameters for GetTargetsAndSegmentsInfo. type GetTargetsAndSegmentsInfoParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` // Comma separated identifiers for multiple targets - Targets *TargetsOptionalParam `json:"targets,omitempty"` + Targets *TargetsOptionalParam `form:"targets,omitempty" json:"targets,omitempty"` // Comma separated identifiers for multiple Target Groups - TargetGroups *TargetGroupsOptionalParam `json:"targetGroups,omitempty"` + TargetGroups *TargetGroupsOptionalParam `form:"targetGroups,omitempty" json:"targetGroups,omitempty"` } // GetTargetsAndSegmentsParams defines parameters for GetTargetsAndSegments. type GetTargetsAndSegmentsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` // Identifier of the target or segment - TsIdentifier *TsIdentifierQueryParam `json:"tsIdentifier,omitempty"` + TsIdentifier *TsIdentifierQueryParam `form:"tsIdentifier,omitempty" json:"tsIdentifier,omitempty"` // Name of the target or segment - TsName *TsNameQueryParam `json:"tsName,omitempty"` + TsName *TsNameQueryParam `form:"tsName,omitempty" json:"tsName,omitempty"` // SortByField - SortByField *TsSortByField `json:"sortByField,omitempty"` + SortByField *GetTargetsAndSegmentsParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` // SortOrder - SortOrder *TsSortOrder `json:"sortOrder,omitempty"` + SortOrder *GetTargetsAndSegmentsParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` } +// GetTargetsAndSegmentsParamsSortByField defines parameters for GetTargetsAndSegments. +type GetTargetsAndSegmentsParamsSortByField string + +// GetTargetsAndSegmentsParamsSortOrder defines parameters for GetTargetsAndSegments. +type GetTargetsAndSegmentsParamsSortOrder string + // GetAllTargetAttributesParams defines parameters for GetAllTargetAttributes. type GetAllTargetAttributesParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // UploadTargetsParams defines parameters for UploadTargets. type UploadTargetsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // DeleteTargetParams defines parameters for DeleteTarget. type DeleteTargetParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // GetTargetParams defines parameters for GetTarget. type GetTargetParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // PatchTargetParams defines parameters for PatchTarget. type PatchTargetParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // ModifyTargetParams defines parameters for ModifyTarget. type ModifyTargetParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` } // GetTargetAvailableSegmentsParams defines parameters for GetTargetAvailableSegments. type GetTargetAvailableSegmentsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` // PageNumber - PageNumber *PageNumber `json:"pageNumber,omitempty"` + PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"` // PageSize - PageSize *PageSize `json:"pageSize,omitempty"` + PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // SortOrder - SortOrder *TasSortOrder `json:"sortOrder,omitempty"` + SortOrder *GetTargetAvailableSegmentsParamsSortOrder `form:"sortOrder,omitempty" json:"sortOrder,omitempty"` // SortByField - SortByField *TasSortByField `json:"sortByField,omitempty"` + SortByField *GetTargetAvailableSegmentsParamsSortByField `form:"sortByField,omitempty" json:"sortByField,omitempty"` // Name of the segment - SegmentName *SegmentNameQueryParam `json:"segmentName,omitempty"` + SegmentName *SegmentNameQueryParam `form:"segmentName,omitempty" json:"segmentName,omitempty"` } +// GetTargetAvailableSegmentsParamsSortOrder defines parameters for GetTargetAvailableSegments. +type GetTargetAvailableSegmentsParamsSortOrder string + +// GetTargetAvailableSegmentsParamsSortByField defines parameters for GetTargetAvailableSegments. +type GetTargetAvailableSegmentsParamsSortByField string + // GetTargetSegmentsParams defines parameters for GetTargetSegments. type GetTargetSegmentsParams struct { - - // Account - AccountIdentifier AccountQueryParam `json:"accountIdentifier"` + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` // Organization Identifier - Org OrgQueryParam `json:"org"` + OrgIdentifier OrgQueryParam `form:"orgIdentifier" json:"orgIdentifier"` - // Project - Project ProjectQueryParam `json:"project"` + // The Project identifier + ProjectIdentifier ProjectQueryParam `form:"projectIdentifier" json:"projectIdentifier"` - // Environment - Environment EnvironmentQueryParam `json:"environment"` + // Environment Identifier + EnvironmentIdentifier EnvironmentQueryParam `form:"environmentIdentifier" json:"environmentIdentifier"` +} + +// GetLicenseUsageParams defines parameters for GetLicenseUsage. +type GetLicenseUsageParams struct { + // Account Identifier + AccountIdentifier AccountQueryParam `form:"accountIdentifier" json:"accountIdentifier"` + + // The timestamp of the result. + Timestamp *Timestamp `form:"timestamp,omitempty" json:"timestamp,omitempty"` } // AddAPIKeyJSONRequestBody defines body for AddAPIKey for application/json ContentType. @@ -1760,10 +2612,16 @@ type ModifyEnvironmentJSONRequestBody EnvironmentRequest type CreateFeatureFlagJSONRequestBody FeatureFlagRequest // UpdateFlagsYamlJSONRequestBody defines body for UpdateFlagsYaml for application/json ContentType. -type UpdateFlagsYamlJSONRequestBody FeatureYamlRequest +type UpdateFlagsYamlJSONRequestBody = FeatureYamlRequest // PatchFeatureJSONRequestBody defines body for PatchFeature for application/json ContentType. -type PatchFeatureJSONRequestBody FeaturePatchRequest +type PatchFeatureJSONRequestBody = FeaturePatchRequest + +// PatchFeaturePipelineJSONRequestBody defines body for PatchFeaturePipeline for application/json ContentType. +type PatchFeaturePipelineJSONRequestBody FeaturePipelineRequest + +// CreateFlagPipelineJSONRequestBody defines body for CreateFlagPipeline for application/json ContentType. +type CreateFlagPipelineJSONRequestBody FeaturePipelineRequest // CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType. type CreateProjectJSONRequestBody ProjectRequest @@ -1772,7 +2630,7 @@ type CreateProjectJSONRequestBody ProjectRequest type ModifyProjectJSONRequestBody ProjectRequest // PatchGitRepoJSONRequestBody defines body for PatchGitRepo for application/json ContentType. -type PatchGitRepoJSONRequestBody GitRepoPatchRequest +type PatchGitRepoJSONRequestBody = GitRepoPatchRequest // CreateGitRepoJSONRequestBody defines body for CreateGitRepo for application/json ContentType. type CreateGitRepoJSONRequestBody GitRepoRequest @@ -1781,14 +2639,13 @@ type CreateGitRepoJSONRequestBody GitRepoRequest type CreateSegmentJSONRequestBody SegmentRequest // PatchSegmentJSONRequestBody defines body for PatchSegment for application/json ContentType. -type PatchSegmentJSONRequestBody SegmentPatchRequest +type PatchSegmentJSONRequestBody = SegmentPatchRequest // CreateTargetJSONRequestBody defines body for CreateTarget for application/json ContentType. -type CreateTargetJSONRequestBody TargetRequest +type CreateTargetJSONRequestBody = TargetRequest // PatchTargetJSONRequestBody defines body for PatchTarget for application/json ContentType. -type PatchTargetJSONRequestBody TargetPatchRequest +type PatchTargetJSONRequestBody = TargetPatchRequest // ModifyTargetJSONRequestBody defines body for ModifyTarget for application/json ContentType. -type ModifyTargetJSONRequestBody TargetRequest - +type ModifyTargetJSONRequestBody = TargetRequest diff --git a/gen/client/services.gen.go b/gen/client/services.gen.go index 0c72a0a3..03aa4bd9 100644 --- a/gen/client/services.gen.go +++ b/gen/client/services.gen.go @@ -1,6 +1,6 @@ // Package client provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT. package client import ( @@ -90,7 +90,7 @@ func WithRequestEditorFn(fn RequestEditorFn) ClientOption { // The interface specification for the client above. type ClientInterface interface { - // Authenticate request with any body + // Authenticate request with any body AuthenticateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Authenticate(ctx context.Context, body AuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -113,7 +113,7 @@ type ClientInterface interface { // GetEvaluationByIdentifier request GetEvaluationByIdentifier(ctx context.Context, environmentUUID string, target string, feature string, params *GetEvaluationByIdentifierParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // PostMetrics request with any body + // PostMetrics request with any body PostMetricsWithBody(ctx context.Context, environment EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) PostMetrics(ctx context.Context, environment EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -276,13 +276,13 @@ func NewAuthenticateRequestWithBody(server string, contentType string, body io.R operationPath := fmt.Sprintf("/client/auth") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { @@ -312,13 +312,13 @@ func NewGetFeatureConfigRequest(server string, environmentUUID string, params *G operationPath := fmt.Sprintf("/client/env/%s/feature-configs", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -373,13 +373,13 @@ func NewGetFeatureConfigByIdentifierRequest(server string, environmentUUID strin operationPath := fmt.Sprintf("/client/env/%s/feature-configs/%s", pathParam0, pathParam1) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -427,13 +427,13 @@ func NewGetAllSegmentsRequest(server string, environmentUUID string, params *Get operationPath := fmt.Sprintf("/client/env/%s/target-segments", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -488,13 +488,13 @@ func NewGetSegmentByIdentifierRequest(server string, environmentUUID string, ide operationPath := fmt.Sprintf("/client/env/%s/target-segments/%s", pathParam0, pathParam1) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -549,13 +549,13 @@ func NewGetEvaluationsRequest(server string, environmentUUID string, target stri operationPath := fmt.Sprintf("/client/env/%s/target/%s/evaluations", pathParam0, pathParam1) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -617,13 +617,13 @@ func NewGetEvaluationByIdentifierRequest(server string, environmentUUID string, operationPath := fmt.Sprintf("/client/env/%s/target/%s/evaluations/%s", pathParam0, pathParam1, pathParam2) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -682,13 +682,13 @@ func NewPostMetricsRequestWithBody(server string, environment EnvironmentPathPar operationPath := fmt.Sprintf("/metrics/%s", pathParam0) if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -731,13 +731,13 @@ func NewStreamRequest(server string, params *StreamParams) (*http.Request, error operationPath := fmt.Sprintf("/stream") if operationPath[0] == '/' { - operationPath = operationPath[1:] - } - operationURL := url.URL{ - Path: operationPath, + operationPath = "." + operationPath } - queryURL := serverURL.ResolveReference(&operationURL) + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } queryValues := queryURL.Query() @@ -819,7 +819,7 @@ func WithBaseURL(baseURL string) ClientOption { // ClientWithResponsesInterface is the interface specification for the client with responses above. type ClientWithResponsesInterface interface { - // Authenticate request with any body + // Authenticate request with any body AuthenticateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateResponse, error) AuthenticateWithResponse(ctx context.Context, body AuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateResponse, error) @@ -842,7 +842,7 @@ type ClientWithResponsesInterface interface { // GetEvaluationByIdentifier request GetEvaluationByIdentifierWithResponse(ctx context.Context, environmentUUID string, target string, feature string, params *GetEvaluationByIdentifierParams, reqEditors ...RequestEditorFn) (*GetEvaluationByIdentifierResponse, error) - // PostMetrics request with any body + // PostMetrics request with any body PostMetricsWithBodyWithResponse(ctx context.Context, environment EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error) PostMetricsWithResponse(ctx context.Context, environment EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error) @@ -977,10 +977,20 @@ type GetEvaluationsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded struct due to allOf(#/components/schemas/Evaluations) - Evaluations `yaml:",inline"` + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } } @@ -1167,7 +1177,7 @@ func (c *ClientWithResponses) StreamWithResponse(ctx context.Context, params *St // ParseAuthenticateResponse parses an HTTP response from a AuthenticateWithResponse call func ParseAuthenticateResponse(rsp *http.Response) (*AuthenticateResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1221,7 +1231,7 @@ func ParseAuthenticateResponse(rsp *http.Response) (*AuthenticateResponse, error // ParseGetFeatureConfigResponse parses an HTTP response from a GetFeatureConfigWithResponse call func ParseGetFeatureConfigResponse(rsp *http.Response) (*GetFeatureConfigResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1247,7 +1257,7 @@ func ParseGetFeatureConfigResponse(rsp *http.Response) (*GetFeatureConfigRespons // ParseGetFeatureConfigByIdentifierResponse parses an HTTP response from a GetFeatureConfigByIdentifierWithResponse call func ParseGetFeatureConfigByIdentifierResponse(rsp *http.Response) (*GetFeatureConfigByIdentifierResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1273,7 +1283,7 @@ func ParseGetFeatureConfigByIdentifierResponse(rsp *http.Response) (*GetFeatureC // ParseGetAllSegmentsResponse parses an HTTP response from a GetAllSegmentsWithResponse call func ParseGetAllSegmentsResponse(rsp *http.Response) (*GetAllSegmentsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1327,7 +1337,7 @@ func ParseGetAllSegmentsResponse(rsp *http.Response) (*GetAllSegmentsResponse, e // ParseGetSegmentByIdentifierResponse parses an HTTP response from a GetSegmentByIdentifierWithResponse call func ParseGetSegmentByIdentifierResponse(rsp *http.Response) (*GetSegmentByIdentifierResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1381,7 +1391,7 @@ func ParseGetSegmentByIdentifierResponse(rsp *http.Response) (*GetSegmentByIdent // ParseGetEvaluationsResponse parses an HTTP response from a GetEvaluationsWithResponse call func ParseGetEvaluationsResponse(rsp *http.Response) (*GetEvaluationsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1394,10 +1404,20 @@ func ParseGetEvaluationsResponse(rsp *http.Response) (*GetEvaluationsResponse, e switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - // Embedded struct due to allOf(#/components/schemas/Pagination) - Pagination `yaml:",inline"` - // Embedded struct due to allOf(#/components/schemas/Evaluations) - Evaluations `yaml:",inline"` + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err @@ -1412,7 +1432,7 @@ func ParseGetEvaluationsResponse(rsp *http.Response) (*GetEvaluationsResponse, e // ParseGetEvaluationByIdentifierResponse parses an HTTP response from a GetEvaluationByIdentifierWithResponse call func ParseGetEvaluationByIdentifierResponse(rsp *http.Response) (*GetEvaluationByIdentifierResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1438,7 +1458,7 @@ func ParseGetEvaluationByIdentifierResponse(rsp *http.Response) (*GetEvaluationB // ParsePostMetricsResponse parses an HTTP response from a PostMetricsWithResponse call func ParsePostMetricsResponse(rsp *http.Response) (*PostMetricsResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1478,7 +1498,7 @@ func ParsePostMetricsResponse(rsp *http.Response) (*PostMetricsResponse, error) // ParseStreamResponse parses an HTTP response from a StreamWithResponse call func ParseStreamResponse(rsp *http.Response) (*StreamResponse, error) { bodyBytes, err := ioutil.ReadAll(rsp.Body) - defer rsp.Body.Close() + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } @@ -1488,9 +1508,5 @@ func ParseStreamResponse(rsp *http.Response) (*StreamResponse, error) { HTTPResponse: rsp, } - switch { - } - return response, nil } - diff --git a/gen/client/types.gen.go b/gen/client/types.gen.go index 8c4bd2ba..68db258c 100644 --- a/gen/client/types.gen.go +++ b/gen/client/types.gen.go @@ -1,12 +1,32 @@ // Package client provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT. package client const ( + ApiKeyAuthScopes = "ApiKeyAuth.Scopes" BearerAuthScopes = "BearerAuth.Scopes" ) +// Defines values for FeatureConfigKind. +const ( + Boolean FeatureConfigKind = "boolean" + Int FeatureConfigKind = "int" + Json FeatureConfigKind = "json" + String FeatureConfigKind = "string" +) + +// Defines values for FeatureState. +const ( + Off FeatureState = "off" + On FeatureState = "on" +) + +// Defines values for MetricsDataMetricsType. +const ( + FFMETRICS MetricsDataMetricsType = "FFMETRICS" +) + // AuthenticationRequest defines model for AuthenticationRequest. type AuthenticationRequest struct { ApiKey string `json:"apiKey"` @@ -23,24 +43,42 @@ type AuthenticationResponse struct { AuthToken string `json:"authToken"` } -// Clause defines model for Clause. +// A clause describes what conditions are used to evaluate a flag type Clause struct { - Attribute string `json:"attribute"` - Id string `json:"id"` - Negate bool `json:"negate"` - Op string `json:"op"` - Values []string `json:"values"` + // The attribute to use in the clause. This can be any target attribute + Attribute string `json:"attribute"` + + // The unique ID for the clause + Id *string `json:"id,omitempty"` + + // Is the operation negated? + Negate bool `json:"negate"` + + // The type of operation such as equals, starts_with, contains + Op string `json:"op"` + + // The values that are compared against the operator + Values []string `json:"values"` } -// Distribution defines model for Distribution. +// Describes a distribution rule type Distribution struct { - BucketBy string `json:"bucketBy"` + // The attribute to use when distributing targets across buckets + BucketBy string `json:"bucketBy"` + + // A list of variations and the weight that should be given to each Variations []WeightedVariation `json:"variations"` } // Error defines model for Error. type Error struct { - Code string `json:"code"` + // The http error code + Code string `json:"code"` + + // Additional details about the error + Details *map[string]interface{} `json:"details,omitempty"` + + // The reason the request failed Message string `json:"message"` } @@ -53,32 +91,32 @@ type Evaluation struct { } // Evaluations defines model for Evaluations. -type Evaluations []Evaluation +type Evaluations = []Evaluation // FeatureConfig defines model for FeatureConfig. type FeatureConfig struct { - DefaultServe Serve `json:"defaultServe"` - Environment string `json:"environment"` - Feature string `json:"feature"` - Kind string `json:"kind"` - OffVariation string `json:"offVariation"` - Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"` - Project string `json:"project"` - Rules *[]ServingRule `json:"rules,omitempty"` + // Describe the distribution rule and the variation that should be served to the target + DefaultServe Serve `json:"defaultServe"` + Environment string `json:"environment"` + Feature string `json:"feature"` + Kind FeatureConfigKind `json:"kind"` + OffVariation string `json:"offVariation"` + Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"` + Project string `json:"project"` + Rules *[]ServingRule `json:"rules,omitempty"` + + // The state of a flag either off or on State FeatureState `json:"state"` VariationToTargetMap *[]VariationMap `json:"variationToTargetMap,omitempty"` Variations []Variation `json:"variations"` Version *int64 `json:"version,omitempty"` } -// FeatureState defines model for FeatureState. -type FeatureState string +// FeatureConfigKind defines model for FeatureConfig.Kind. +type FeatureConfigKind string -// List of FeatureState -const ( - FeatureState_off FeatureState = "off" - FeatureState_on FeatureState = "on" -) +// The state of a flag either off or on +type FeatureState string // KeyValue defines model for KeyValue. type KeyValue struct { @@ -98,79 +136,137 @@ type MetricsData struct { Count int `json:"count"` // This can be of type FeatureMetrics - MetricsType string `json:"metricsType"` + MetricsType MetricsDataMetricsType `json:"metricsType"` // time at when this data was recorded Timestamp int64 `json:"timestamp"` } +// This can be of type FeatureMetrics +type MetricsDataMetricsType string + // Pagination defines model for Pagination. type Pagination struct { - ItemCount int `json:"itemCount"` - PageCount int `json:"pageCount"` - PageIndex int `json:"pageIndex"` - PageSize int `json:"pageSize"` - Version *int `json:"version,omitempty"` + // The total number of items + ItemCount int `json:"itemCount"` + + // The total number of pages + PageCount int `json:"pageCount"` + + // The current page + PageIndex int `json:"pageIndex"` + + // The number of items per page + PageSize int `json:"pageSize"` + + // The version of this object. The version will be incremented each time the object is modified + Version *int `json:"version,omitempty"` } -// Prerequisite defines model for Prerequisite. +// Feature Flag pre-requisites type Prerequisite struct { - Feature string `json:"feature"` + // The feature identifier that is the prerequisite + Feature string `json:"feature"` + + // A list of variations that must be met Variations []string `json:"variations"` } -// Segment defines model for Segment. +// A Target Group (Segment) response type Segment struct { - CreatedAt *int64 `json:"createdAt,omitempty"` - Environment *string `json:"environment,omitempty"` - Excluded *[]Target `json:"excluded,omitempty"` + // The data and time in milliseconds when the group was created + CreatedAt *int64 `json:"createdAt,omitempty"` - // Unique identifier for the segment. - Identifier string `json:"identifier"` - Included *[]Target `json:"included,omitempty"` - ModifiedAt *int64 `json:"modifiedAt,omitempty"` + // The environment this target group belongs to + Environment *string `json:"environment,omitempty"` - // Name of the segment. + // A list of Targets who are excluded from this target group + Excluded *[]Target `json:"excluded,omitempty"` + + // Unique identifier for the target group. + Identifier string `json:"identifier"` + + // A list of Targets who belong to this target group + Included *[]Target `json:"included,omitempty"` + + // The data and time in milliseconds when the group was last modified + ModifiedAt *int64 `json:"modifiedAt,omitempty"` + + // Name of the target group. Name string `json:"name"` // An array of rules that can cause a user to be included in this segment. - Rules *[]Clause `json:"rules,omitempty"` - Tags *[]Tag `json:"tags,omitempty"` - Version *int64 `json:"version,omitempty"` + Rules *[]Clause `json:"rules,omitempty"` + + // Tags for this target group + Tags *[]Tag `json:"tags,omitempty"` + + // The version of this group. Each time it is modified the version is incremented + Version *int64 `json:"version,omitempty"` } -// Serve defines model for Serve. +// Describe the distribution rule and the variation that should be served to the target type Serve struct { + // Describes a distribution rule Distribution *Distribution `json:"distribution,omitempty"` Variation *string `json:"variation,omitempty"` } -// ServingRule defines model for ServingRule. +// The rule used to determine what variation to serve to a target type ServingRule struct { - Clauses []Clause `json:"clauses"` - Priority int `json:"priority"` - RuleId string `json:"ruleId"` - Serve Serve `json:"serve"` + // A list of clauses to use in the rule + Clauses []Clause `json:"clauses"` + + // The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest + Priority int `json:"priority"` + + // The unique identifier for this rule + RuleId *string `json:"ruleId,omitempty"` + + // Describe the distribution rule and the variation that should be served to the target + Serve Serve `json:"serve"` } -// A name and value pair. +// A tag has a name and value type Tag struct { - Name string `json:"name"` + // The name of the tag + Name string `json:"name"` + + // The value of the tag Value *string `json:"value,omitempty"` } -// Target defines model for Target. +// A Target object type Target struct { - Account string `json:"account"` - Anonymous *bool `json:"anonymous,omitempty"` - Attributes *map[string]interface{} `json:"attributes,omitempty"` - CreatedAt *int64 `json:"createdAt,omitempty"` - Environment string `json:"environment"` - Identifier string `json:"identifier"` - Name string `json:"name"` - Org string `json:"org"` - Project string `json:"project"` - Segments *[]Segment `json:"segments,omitempty"` + // The account ID that the target belongs to + Account string `json:"account"` + + // Indicates if this target is anonymous + Anonymous *bool `json:"anonymous,omitempty"` + + // a JSON representation of the attributes for this target + Attributes *map[string]interface{} `json:"attributes,omitempty"` + + // The date and time in milliseconds when this Target was created + CreatedAt *int64 `json:"createdAt,omitempty"` + + // The identifier for the environment that the target belongs to + Environment string `json:"environment"` + + // The unique identifier for this target + Identifier string `json:"identifier"` + + // The name of this Target + Name string `json:"name"` + + // The identifier for the organization that the target belongs to + Org string `json:"org"` + + // The identifier for the project that this target belongs to + Project string `json:"project"` + + // A list of Target Groups (Segments) that this Target belongs to + Segments *[]Segment `json:"segments,omitempty"` } // TargetData defines model for TargetData. @@ -180,117 +276,126 @@ type TargetData struct { Name string `json:"name"` } -// TargetMap defines model for TargetMap. +// Target map provides the details of a target that belongs to a flag type TargetMap struct { - Identifier *string `json:"identifier,omitempty"` - Name string `json:"name"` + // The identifier for the target + Identifier string `json:"identifier"` + + // The name of the target + Name string `json:"name"` } -// Variation defines model for Variation. +// A variation of a flag that can be returned to a target type Variation struct { + // A description of the variation Description *string `json:"description,omitempty"` - Identifier string `json:"identifier"` - Name *string `json:"name,omitempty"` - Value string `json:"value"` + + // The unique identifier for the variation + Identifier string `json:"identifier"` + + // The user friendly name of the variation + Name *string `json:"name,omitempty"` + + // The variation value to serve such as true or false for a boolean flag + Value string `json:"value"` } -// VariationMap defines model for VariationMap. +// A mapping of variations to targets and target groups (segments). The targets listed here should receive this variation. type VariationMap struct { - TargetSegments *[]string `json:"targetSegments,omitempty"` - Targets *[]TargetMap `json:"targets,omitempty"` - Variation string `json:"variation"` + // A list of target groups (segments) + TargetSegments *[]string `json:"targetSegments,omitempty"` + + // A list of target mappings + Targets *[]TargetMap `json:"targets,omitempty"` + + // The variation identifier + Variation string `json:"variation"` } -// WeightedVariation defines model for WeightedVariation. +// A variation and the weighting it should receive as part of a percentage rollout type WeightedVariation struct { + // The variation identifier Variation string `json:"variation"` - Weight int `json:"weight"` + + // The weight to be given to the variation in percent + Weight int `json:"weight"` } // ClusterQueryOptionalParam defines model for clusterQueryOptionalParam. -type ClusterQueryOptionalParam string +type ClusterQueryOptionalParam = string // EnvironmentPathParam defines model for environmentPathParam. -type EnvironmentPathParam string +type EnvironmentPathParam = string // InternalServerError defines model for InternalServerError. -type InternalServerError Error +type InternalServerError = Error // NotFound defines model for NotFound. -type NotFound Error +type NotFound = Error // Unauthenticated defines model for Unauthenticated. -type Unauthenticated Error +type Unauthenticated = Error // Unauthorized defines model for Unauthorized. -type Unauthorized Error +type Unauthorized = Error // AuthenticateJSONBody defines parameters for Authenticate. -type AuthenticateJSONBody AuthenticationRequest +type AuthenticateJSONBody = AuthenticationRequest // GetFeatureConfigParams defines parameters for GetFeatureConfig. type GetFeatureConfigParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` } // GetFeatureConfigByIdentifierParams defines parameters for GetFeatureConfigByIdentifier. type GetFeatureConfigByIdentifierParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` } // GetAllSegmentsParams defines parameters for GetAllSegments. type GetAllSegmentsParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` } // GetSegmentByIdentifierParams defines parameters for GetSegmentByIdentifier. type GetSegmentByIdentifierParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` } // GetEvaluationsParams defines parameters for GetEvaluations. type GetEvaluationsParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` } // GetEvaluationByIdentifierParams defines parameters for GetEvaluationByIdentifier. type GetEvaluationByIdentifierParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` } // PostMetricsJSONBody defines parameters for PostMetrics. -type PostMetricsJSONBody Metrics +type PostMetricsJSONBody = Metrics // PostMetricsParams defines parameters for PostMetrics. type PostMetricsParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` } // StreamParams defines parameters for Stream. type StreamParams struct { - // Unique identifier for the cluster for the account - Cluster *ClusterQueryOptionalParam `json:"cluster,omitempty"` + Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"` APIKey string `json:"API-Key"` } // AuthenticateJSONRequestBody defines body for Authenticate for application/json ContentType. -type AuthenticateJSONRequestBody AuthenticateJSONBody +type AuthenticateJSONRequestBody = AuthenticateJSONBody // PostMetricsJSONRequestBody defines body for PostMetrics for application/json ContentType. -type PostMetricsJSONRequestBody PostMetricsJSONBody - +type PostMetricsJSONRequestBody = PostMetricsJSONBody diff --git a/go.mod b/go.mod index cb2d3f75..1b03afbf 100644 --- a/go.mod +++ b/go.mod @@ -1,21 +1,21 @@ module github.com/harness/ff-proxy -go 1.17 +go 1.18 require ( - github.com/deepmap/oapi-codegen v1.6.0 + github.com/deepmap/oapi-codegen v1.11.0 github.com/fanout/go-gripcontrol v0.0.0-20181114050548-adc1002dfd32 github.com/go-kit/kit v0.12.0 github.com/go-redis/redis/v8 v8.11.4 github.com/golang-jwt/jwt v3.2.2+incompatible github.com/golang-jwt/jwt/v4 v4.4.2 github.com/google/uuid v1.3.0 - github.com/harness/ff-golang-server-sdk v0.0.25-0.20220216175230-9e1cef7fe2a8 + github.com/harness/ff-golang-server-sdk v0.1.3 github.com/hashicorp/go-retryablehttp v0.6.8 - github.com/labstack/echo/v4 v4.6.1 + github.com/labstack/echo/v4 v4.7.2 github.com/r3labs/sse v0.0.0-20201126193848-34e640891548 github.com/sirupsen/logrus v1.8.1 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.1 go.uber.org/zap v1.19.1 gopkg.in/yaml.v2 v2.4.0 ) @@ -27,34 +27,33 @@ require ( github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/fanout/go-pubcontrol v0.0.0-20181114050323-6700863ff8fe // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/getkin/kin-openapi v0.53.0 // indirect - github.com/ghodss/yaml v1.0.0 // indirect + github.com/getkin/kin-openapi v0.98.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/swag v0.21.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/invopop/yaml v0.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/labstack/gommon v0.3.0 // indirect - github.com/mailru/easyjson v0.7.6 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect + github.com/labstack/gommon v0.3.1 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.1 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect - golang.org/x/net v0.0.0-20210917221730-978cfadd31cf // indirect - golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 // indirect + golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9 // indirect + golang.org/x/net v0.0.0-20220513224357-95641704303c // indirect + golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 6cf3b4f8..bf5d9517 100644 --- a/go.sum +++ b/go.sum @@ -1,853 +1,306 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go.mod h1:tmAIfUFEirG/Y8jhZ9M+h36obRZAk/1fcSpXwAVlfqE= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/deepmap/oapi-codegen v1.11.0 h1:f/X2NdIkaBKsSdpeuwLnY/vDI0AtPUrmB5LMgc7YD+A= +github.com/deepmap/oapi-codegen v1.11.0/go.mod h1:k+ujhoQGxmQYBZBbxhOZNZf4j08qv5mC+OH+fFTnKxM= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fanout/go-gripcontrol v0.0.0-20181114050548-adc1002dfd32 h1:EjjyfA60tq/r67iLiRfEPpte+TIRS34MrOBs7Sli4z0= github.com/fanout/go-gripcontrol v0.0.0-20181114050548-adc1002dfd32/go.mod h1:P/WDSh6TzXrmWJt5R1Pfbb4bPUGV/vYHM4MgV2VMBaU= github.com/fanout/go-pubcontrol v0.0.0-20181114050323-6700863ff8fe h1:PpGB2P6TBa2Ql9WlNprWcCBAe//gwQ6DCXfUPFChwIM= github.com/fanout/go-pubcontrol v0.0.0-20181114050323-6700863ff8fe/go.mod h1:7E12GoiO4rKf3D2aN6yi/4i+OdDaaTV0meewu6SBLDQ= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/getkin/kin-openapi v0.53.0 h1:7WzP+MZRRe7YQz2Kc74Ley3dukJmXDvifVbElGmQfoA= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/getkin/kin-openapi v0.94.0/go.mod h1:LWZfzOd7PRy8GJ1dJ6mCU6tNdSfOwRac1BUPam4aw6Q= +github.com/getkin/kin-openapi v0.98.0 h1:lIACvCG9cxmFsEywz+LCoVhcZHFLUy+Nv5QSkb43eAE= +github.com/getkin/kin-openapi v0.98.0/go.mod h1:w4lRPHiyOdwGbOkLIyk+P0qCwlu7TXPCHD/64nSXzgE= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= +github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-redis/redis/v8 v8.11.4 h1:kHoYkfZP6+pe04aFTnhDH6GDROa5yJdHJVNxV3F46Tg= github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/harness/ff-golang-server-sdk v0.0.25-0.20220216175230-9e1cef7fe2a8 h1:QQULsWof+hz84lFLSquHwA9zQwgW9Slr8d2XGtO03Jk= -github.com/harness/ff-golang-server-sdk v0.0.25-0.20220216175230-9e1cef7fe2a8/go.mod h1:LRSKL1xL+RrAesnL5eq/dA/EQJ9G0F1XSxPCaapS2Vk= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/harness/ff-golang-server-sdk v0.1.3 h1:z7bMMlDIIGCZ62EyFz/MPkxe02YUodIbfbrnB9V4uKI= +github.com/harness/ff-golang-server-sdk v0.1.3/go.mod h1:wVdWTn+0nPjHf25cvyJ03UnSFKTId2JGUdVIliD/VnU= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.8 h1:92lWxgpa+fF3FozM4B3UZtHZMJX8T5XT+TFdCxsPyWs= github.com/hashicorp/go-retryablehttp v0.6.8/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/invopop/yaml v0.1.0 h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc= +github.com/invopop/yaml v0.1.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= github.com/jarcoal/httpmock v1.0.8 h1:8kI16SoO6LQKgPE7PvQuV+YuD/inwHd7fOOe2zMbo4k= -github.com/jarcoal/httpmock v1.0.8/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/echo/v4 v4.6.1 h1:OMVsrnNFzYlGSdaiYGHbgWQnr+JM7NG+B9suCPie14M= -github.com/labstack/echo/v4 v4.6.1/go.mod h1:RnjgMWNDB9g/HucVWhQYNQP9PvbYf6adqftqryo7s9k= -github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/labstack/echo/v4 v4.7.2 h1:Kv2/p8OaQ+M6Ex4eGimg9b9e6icoxA42JSlOR3msKtI= +github.com/labstack/echo/v4 v4.7.2/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks= +github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o= +github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= +github.com/lestrrat-go/blackmagic v1.0.0/go.mod h1:TNgH//0vYSs8VXDCfkZLgIrVTTXQELZffUV0tz3MtdQ= +github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= +github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= +github.com/lestrrat-go/iter v1.0.1/go.mod h1:zIdgO1mRKhn8l9vrZJZz9TUMMFbQbLeTsbqPDrJ/OJc= +github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= +github.com/lestrrat-go/jwx v1.2.24/go.mod h1:zoNuZymNl5lgdcu6P7K6ie2QRll5HVfF4xwxBBK1NxY= +github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= -github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= -github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= -github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/r3labs/sse v0.0.0-20201126193848-34e640891548 h1:ewzX4RiFeFXl8APBmMqXBXR5CZoF/jctB71BuLg7d3s= github.com/r3labs/sse v0.0.0-20201126193848-34e640891548/go.mod h1:S8xSOnV3CgpNrWd0GQ/OoQfMtlg2uPRSuTzcSGrzwK8= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9 h1:NUzdAbFtCJSXU20AOXgeqaUwg8Ypg4MPYmL+d+rsB5c= +golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210917221730-978cfadd31cf h1:R150MpwJIv1MpS0N/pc+NhTM8ajzvlmxlY5OYsrevXQ= -golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -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-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220513224357-95641704303c h1:nF9mHSvoKBLkQNQhJZNsc66z2UzAMUbLGjC95CF3pU0= +golang.org/x/net v0.0.0-20220513224357-95641704303c/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678 h1:J27LZFQBFoihqXoegpscI10HpjZ7B5WQLLKL2FZXQKw= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a h1:N2T1jUrTQE9Re6TFF5PhvEHXHCguynGhKjWVsIUt5cY= +golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRinntgeXO2AeZVd0AWD3w= +golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/repository/feature_flag_repo_test.go b/repository/feature_flag_repo_test.go index 227cccfd..1c3fa13d 100644 --- a/repository/feature_flag_repo_test.go +++ b/repository/feature_flag_repo_test.go @@ -28,7 +28,7 @@ var ( Clauses: []clientgen.Clause{ { Attribute: "name", - Id: "79f5bca0-17ca-42c2-8934-5cee840fe2e0", + Id: strPtr("79f5bca0-17ca-42c2-8934-5cee840fe2e0"), Negate: false, Op: "equal", Values: []string{ @@ -37,13 +37,13 @@ var ( }, }, Priority: 1, - RuleId: "8756c207-abf8-4202-83fd-dedf5d27e2c2", + RuleId: strPtr("8756c207-abf8-4202-83fd-dedf5d27e2c2"), Serve: clientgen.Serve{ Variation: strPtr("false"), }, }, }, - State: clientgen.FeatureState_on, + State: clientgen.On, VariationToTargetMap: &[]clientgen.VariationMap{ { TargetSegments: &[]string{ @@ -51,7 +51,7 @@ var ( }, Targets: &[]clientgen.TargetMap{ { - Identifier: strPtr("davej"), + Identifier: "davej", Name: "Dave Johnston", }, }, @@ -92,7 +92,7 @@ var ( Clauses: []clientgen.Clause{ { Attribute: "name", - Id: "79f5bca0-17ca-42c2-8934-5cee840fe2e0", + Id: strPtr("79f5bca0-17ca-42c2-8934-5cee840fe2e0"), Negate: false, Op: "equal", Values: []string{ @@ -101,13 +101,13 @@ var ( }, }, Priority: 1, - RuleId: "8756c207-abf8-4202-83fd-dedf5d27e2c2", + RuleId: strPtr("8756c207-abf8-4202-83fd-dedf5d27e2c2"), Serve: clientgen.Serve{ Variation: strPtr("false"), }, }, }, - State: clientgen.FeatureState_on, + State: clientgen.On, VariationToTargetMap: &[]clientgen.VariationMap{ { TargetSegments: &[]string{ @@ -115,7 +115,7 @@ var ( }, Targets: &[]clientgen.TargetMap{ { - Identifier: strPtr("davej"), + Identifier: "davej", Name: "Dave Johnston", }, }, diff --git a/repository/target_repo_test.go b/repository/target_repo_test.go index 75b06c3d..c6494107 100644 --- a/repository/target_repo_test.go +++ b/repository/target_repo_test.go @@ -14,7 +14,9 @@ import ( type mockCache struct { set func() error + setByte func() error get func() error + getByte func() ([]byte, error) getAll func() (map[string][]byte, error) removeAll func() remove func() @@ -29,11 +31,21 @@ func (m *mockCache) Set(ctx context.Context, key string, field string, value enc return m.set() } +// SetByte sets a value in the cache for a given key and field +func (m *mockCache) SetByte(ctx context.Context, key string, field string, value []byte) error { + return m.setByte() +} + // Get gets the value of a field for a given key func (m *mockCache) Get(ctx context.Context, key string, field string, v encoding.BinaryUnmarshaler) error { return m.get() } +// GetByte gets the value of a field for a given key +func (m *mockCache) GetByte(ctx context.Context, key string, field string) ([]byte, error) { + return m.getByte() +} + // GetAll gets all of the fiels and their values for a given key func (m *mockCache) GetAll(ctx context.Context, key string) (map[string][]byte, error) { return m.getAll() diff --git a/services/admin_service.go b/services/admin_service.go index c97182fa..a08bcd97 100644 --- a/services/admin_service.go +++ b/services/admin_service.go @@ -70,8 +70,8 @@ func (r AdminService) PageEnvironments(ctx context.Context, input PageEnvironmen r.log.Debug("getting environments", "projectIdentifier", input.ProjectIdentifier, "pageSize", input.PageSize, "pageNumber", input.PageNumber) resp, err := r.client.GetAllEnvironmentsWithResponse(ctx, &admingen.GetAllEnvironmentsParams{ AccountIdentifier: admingen.AccountQueryParam(input.AccountIdentifier), - Org: admingen.OrgQueryParam(input.OrgIdentifier), - Project: admingen.ProjectQueryParam(input.ProjectIdentifier), + OrgIdentifier: admingen.OrgQueryParam(input.OrgIdentifier), + ProjectIdentifier: admingen.ProjectQueryParam(input.ProjectIdentifier), PageNumber: &pageNumber, PageSize: &pageSize, }) @@ -120,7 +120,7 @@ func (r AdminService) PageProjects(ctx context.Context, input PageProjectsInput) r.log.Debug("getting projects", "pageSize", input.PageSize, "pageNumber", input.PageNumber) resp, err := r.client.GetAllProjectsWithResponse(ctx, &admingen.GetAllProjectsParams{ AccountIdentifier: admingen.AccountQueryParam(input.AccountIdentifier), - Org: admingen.OrgQueryParam(input.OrgIdentifier), + OrgIdentifier: admingen.OrgQueryParam(input.OrgIdentifier), PageNumber: &pageNumber, PageSize: &pageSize, }) @@ -171,12 +171,12 @@ func (r AdminService) PageTargets(ctx context.Context, input PageTargetsInput) ( r.log.Debug("getting targets", "project_identifier", input.ProjectIdentifier, "environment_identifier", input.EnvironmentIdentifier, "pageSize", input.PageSize, "pageNumber", input.PageNumber) resp, err := r.client.GetAllTargetsWithResponse(ctx, &admingen.GetAllTargetsParams{ - AccountIdentifier: admingen.AccountQueryParam(input.AccountIdentifier), - Org: admingen.OrgQueryParam(input.OrgIdentifier), - Project: admingen.ProjectQueryParam(input.ProjectIdentifier), - Environment: admingen.EnvironmentQueryParam(input.EnvironmentIdentifier), - PageNumber: &pageNumber, - PageSize: &pageSize, + AccountIdentifier: admingen.AccountQueryParam(input.AccountIdentifier), + OrgIdentifier: admingen.OrgQueryParam(input.OrgIdentifier), + ProjectIdentifier: admingen.ProjectQueryParam(input.ProjectIdentifier), + EnvironmentIdentifier: admingen.EnvironmentQueryParam(input.EnvironmentIdentifier), + PageNumber: &pageNumber, + PageSize: &pageSize, }) if err != nil { return PageTargetsResult{Finished: true}, err diff --git a/services/admin_service_test.go b/services/admin_service_test.go index e2341b79..ff9473b1 100644 --- a/services/admin_service_test.go +++ b/services/admin_service_test.go @@ -329,8 +329,7 @@ func TestAdminService_PageTargets(t *testing.T) { Body: nil, HTTPResponse: &http.Response{StatusCode: http.StatusOK}, JSON200: &admingen.Targets{ - Pagination: admingen.Pagination{}, - Targets: &[]admingen.Target{}, + Targets: &[]admingen.Target{}, }, }, nil }, @@ -348,8 +347,7 @@ func TestAdminService_PageTargets(t *testing.T) { Body: nil, HTTPResponse: &http.Response{StatusCode: http.StatusUnauthorized}, JSON200: &admingen.Targets{ - Pagination: admingen.Pagination{}, - Targets: &[]admingen.Target{target}, + Targets: &[]admingen.Target{target}, }, }, nil },