diff --git a/cmd/rbac/rbac_create_subject.go b/cmd/rbac/rbac_create_subject.go index 84abe771..d54590ca 100644 --- a/cmd/rbac/rbac_create_subject.go +++ b/cmd/rbac/rbac_create_subject.go @@ -40,6 +40,7 @@ func RunCreateSubjectCommand(args *CreateSubjectArgs) di.CmdWithApiFn { subject := stackstate_api.NewCreateSubject() if args.Scope != "" { subject.SetQuery(args.Scope) + subject.SetVersion("0.0.1") } resp, err := api.SubjectApi.CreateSubject(cli.Context, args.Subject). diff --git a/cmd/rbac/rbac_create_subject_test.go b/cmd/rbac/rbac_create_subject_test.go index f4bbe145..1be0291b 100644 --- a/cmd/rbac/rbac_create_subject_test.go +++ b/cmd/rbac/rbac_create_subject_test.go @@ -48,6 +48,7 @@ func TestCreateSubject(t *testing.T) { otherExpectedSubject := stackstate_api.NewCreateSubject() otherExpectedSubject.SetQuery(SomeScope) + otherExpectedSubject.SetVersion("0.0.1") assert.Equal(t, otherExpectedSubject, calls[0].PcreateSubject) expectedStrings := []string{ diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index b5164792..69067369 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -10715,12 +10715,17 @@ components: CreateSubject: example: query: query + version: version properties: query: type: string + version: + type: string type: object Query: type: string + Version: + type: string SubscriptionState: discriminator: propertyName: _type diff --git a/generated/stackstate_api/docs/CreateSubject.md b/generated/stackstate_api/docs/CreateSubject.md index 4f79bfcb..71fa1cc7 100644 --- a/generated/stackstate_api/docs/CreateSubject.md +++ b/generated/stackstate_api/docs/CreateSubject.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Query** | Pointer to **string** | | [optional] +**Version** | Pointer to **string** | | [optional] ## Methods @@ -50,6 +51,31 @@ SetQuery sets Query field to given value. HasQuery returns a boolean if a field has been set. +### GetVersion + +`func (o *CreateSubject) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *CreateSubject) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *CreateSubject) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *CreateSubject) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/stackstate_api/model_create_subject.go b/generated/stackstate_api/model_create_subject.go index d442188b..799cef1d 100644 --- a/generated/stackstate_api/model_create_subject.go +++ b/generated/stackstate_api/model_create_subject.go @@ -17,7 +17,8 @@ import ( // CreateSubject struct for CreateSubject type CreateSubject struct { - Query *string `json:"query,omitempty"` + Query *string `json:"query,omitempty"` + Version *string `json:"version,omitempty"` } // NewCreateSubject instantiates a new CreateSubject object @@ -69,11 +70,46 @@ func (o *CreateSubject) SetQuery(v string) { o.Query = &v } +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *CreateSubject) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSubject) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *CreateSubject) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *CreateSubject) SetVersion(v string) { + o.Version = &v +} + func (o CreateSubject) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Query != nil { toSerialize["query"] = o.Query } + if o.Version != nil { + toSerialize["version"] = o.Version + } return json.Marshal(toSerialize) } diff --git a/stackstate_openapi/openapi_version b/stackstate_openapi/openapi_version index 4a076531..7f83b942 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -eb3e3df341ccfd167ed8c2e2c14b63a38be686b3 +d8fc5194c51017c8e938a1b54f94bdb8a857d6c8